[Misc] Fix 28 SonarCloud issues in various modules - #1852
Merged
Conversation
* java:S7476 (20): remove decorative `//////` banner comment lines * java:S3706 (8): replace `.stream().forEach()` with `.forEach()` Co-Authored-By: Vincent Massol <vincent@massol.net>
This was referenced Jul 28, 2026
Member
|
@tmortagne I think you're the one using several Let me know if instead of removing them you'd want to use something like Thx PS: I'm applying the PR but can still change the code afterwards |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes 28 SonarCloud issues in xwiki-commons, all purely mechanical and behaviour-neutral.
Rules fixed
//////banner lines framing a real comment (or standalone separators). Removed them.collection.stream().forEach(x)→collection.forEach(x).Notes
Iterable.forEachcall.java:S3878issues inxwiki-commons-logging-*were deliberately not touched:they are the SLF4J
xxx(Marker, String, Object)/xxx(Marker, String, Object, Object)overridesthat delegate to the varargs overload via
new Object[] { ... }. Dropping the array would re-bindthe call to the fixed-arity overload, i.e. the enclosing method itself — infinite recursion.
xwiki-commons-extension-apiwere left out: that module currently fails itsown
revapicheck onmaster(java.annotation.removedonIndexedExtension#isCompatible,fallout from the recent javax→JSpecify
@Nullablemigration), which is unrelated to this changeand would have made the PR red.
mvn clean install -Plegacy,quality(Checkstyle, Revapi, JaCoCo and the unit tests)on the 9 modified modules.
Related
Same sweep in the sibling repos:
Generated by Claude Code