Branch: refs/heads/backport/stable-18.4.x/misc-sonar-npe-guards Home: https://github.com/xwiki/xwiki-platform Commit: 13808c8e6c141e2b9381ef8d3c3c8d3d1438f41b https://github.com/xwiki/xwiki-platform/commit/13808c8e6c141e2b9381ef8d3c3c8... Author: Vincent Massol <[email protected]> Date: 2026-07-22 (Wed, 22 Jul 2026) Changed paths: M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/pdf/impl/FileSystemURLFactory.java M xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/script/WysiwygEditorScriptService.java Log Message: ----------- [Misc] Fix additional SonarQube-reported NPE risks blocking the quality gate * FileSystemURLFactory: instead of null-checking the file mapping at each call site, make getFileMapping() lazily create and store the mapping in the context, so it's always non-null and callers' mutations still persist. * WysiwygEditorScriptService: handle the null source reference in a single place (the 4-arg overload) rather than short-circuiting in the deprecated 2-arg overload. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> (cherry picked from commit d33553c3cc47461cb9fc0d3a95b6b2369667c562) To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications