[xwiki/xwiki-platform] 59c69c: [Misc] Fix double-checked locking by making urlFac...
Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-platform Commit: 59c69cd7b55dab90f42d0d4e13e0c7c17d4a9c26 https://github.com/xwiki/xwiki-platform/commit/59c69cd7b55dab90f42d0d4e13e0c... Author: Vincent Massol <[email protected]> Date: 2026-05-13 (Wed, 13 May 2026) Changed paths: M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Log Message: ----------- [Misc] Fix double-checked locking by making urlFactoryService volatile Fixes SonarCloud blocker issue S2168 in XWiki.java. The getURLFactoryService() method uses double-checked locking (check-then-lock-then-check) which is only safe in Java when the guarded field is declared volatile. Without volatile, the JVM may reorder writes and a second thread can observe a partially-initialized object. Co-authored-by: Claude <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications