[xwiki/xwiki-commons] a0adda: [Misc] Fix mechanical SonarQube issues in several ...
Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-commons Commit: a0adda2dd5b5e7265b0ada953d3cd8f175d0aa2d https://github.com/xwiki/xwiki-commons/commit/a0adda2dd5b5e7265b0ada953d3cd8... Author: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Date: 2026-08-11 (Tue, 11 Aug 2026) Changed paths: M xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/RepositoryUtils.java M xwiki-commons-core/xwiki-commons-filter/xwiki-commons-filter-test/src/main/java/org/xwiki/filter/test/integration/junit5/InternalFilterTest.java M xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-classloader/xwiki-commons-legacy-classloader-api/src/main/java/org/xwiki/classloader/internal/ResourceLoader.java M xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/tools/URLTool.java Log Message: ----------- [Misc] Fix mechanical SonarQube issues in several modules (#1894) * [Misc] Fix mechanical SonarQube issues in several modules * java:S3824: replace Map.get()/containsKey() followed by a conditional put with Map.computeIfAbsent() * java:S3457: drop a redundant toString() on a parameterized log argument Co-Authored-By: Vincent Massol <[email protected]> * [Misc] Keep the eager String for the RepositoryUtils search log * The java:S3457 fix on RepositoryUtils reverted the hunk XWIKI-24665 (#1884) had just applied. RepositoryUtils.search runs on extension job threads, where AbstractJobStatus captures the LogEvent with its raw Object[] and SafeMessageConverter XStream-serializes it into the job log, so the eager String is deliberate. * Use String.valueOf(...) instead: it clears java:S3457 (no toString() call) while keeping the snapshot, as done in DefaultJobProgress by #1872. No java:S2629 suppression is needed here since the call sits in a catch block, which that rule skips. Co-Authored-By: Vincent Massol <[email protected]> --------- Co-authored-by: Vincent Massol <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-commons/settings/notifications
participants (1)
-
XWiki Notifications