[xwiki/xwiki-platform] 711ece: [Misc] Explain why cloneResult() does not clone in...
Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-platform Commit: 711ece45f2bdb01b04c8d37061795b5fb969528b https://github.com/xwiki/xwiki-platform/commit/711ece45f2bdb01b04c8d37061795... Author: Vincent Massol <[email protected]> Date: 2026-08-17 (Mon, 17 Aug 2026) Changed paths: M xwiki-platform-core/xwiki-platform-lesscss/xwiki-platform-lesscss-default/src/main/java/org/xwiki/lesscss/internal/compiler/DefaultLESSCompiler.java Log Message: ----------- [Misc] Explain why cloneResult() does not clone in DefaultLESSCompiler * Follow-up to the java:S2129 SonarQube fix: the contract of cloneResult() is to keep the caller from modifying the instance held in the cache, which is why the ColorTheme implementation copies. String is immutable so there is nothing to protect, and returning the cached instance is safe. Co-Authored-By: Vincent Massol <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications