[xwiki/xwiki-commons] 8fd742: [Misc] Fix SonarCloud S3077 bug in EmbeddableCompo...
Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-commons Commit: 8fd742295cb8bd2c3fde2a2d4a30a7f3cea650d2 https://github.com/xwiki/xwiki-commons/commit/8fd742295cb8bd2c3fde2a2d4a30a7... Author: Vincent Massol <[email protected]> Date: 2026-07-11 (Sat, 11 Jul 2026) Changed paths: M xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/src/main/java/org/xwiki/component/embed/EmbeddableComponentManager.java Log Message: ----------- [Misc] Fix SonarCloud S3077 bug in EmbeddableComponentManager Replace the "volatile R instance" field of ComponentEntry with a "final AtomicReference<R>". SonarCloud (java:S3077) reports that marking an object reference volatile only guarantees visibility of the reference itself, so the recommended fix is to use a thread-safe holder. The AtomicReference preserves the volatile read/write semantics the double-checked-locking relies on while clearing the warning. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-commons/settings/notifications
participants (1)
-
XWiki Notifications