Branch: refs/heads/backport/stable-17.10.x/sonar-qualitygate-npe Home: https://github.com/xwiki/xwiki-platform Commit: e0662cfe0a00b62808cc30ef195eba48ded39043 https://github.com/xwiki/xwiki-platform/commit/e0662cfe0a00b62808cc30ef195eb... Author: Vincent Massol <[email protected]> Date: 2026-07-26 (Sun, 26 Jul 2026) Changed paths: M xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-api/src/main/java/org/xwiki/livedata/internal/DefaultLiveDataConfigurationResolver.java M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java M xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-async/xwiki-platform-rendering-async-default/src/main/java/org/xwiki/rendering/async/internal/AsyncRendererCacheListener.java M xwiki-platform-core/xwiki-platform-scheduler/xwiki-platform-scheduler-api/src/main/java/com/xpn/xwiki/plugin/scheduler/SchedulerPlugin.java Log Message: ----------- [Misc] Fix sonarqube-reported issues that block the quality gate The three JavaScript files touched by the original commit (attachments.js, locationPicker.js, upload.js) are left out: on this branch they still use the pre-ES6 Prototype.js form, so the lines the original commit rewrote either do not exist here or sit in a differently-shaped function. Their changes are cosmetic rule cleanups (parseInt -> Number.parseInt, replace -> replaceAll) that do not affect this branch's quality gate. Use the "status" literal instead of the STATUS constant in SchedulerPlugin, which this branch does not declare. (cherry picked from commit 630fe598748109ba75f6de268c972ad08c5c3ce3) Commit: 73cb7158262296e3150649272fc7a50bb2575d7f https://github.com/xwiki/xwiki-platform/commit/73cb7158262296e3150649272fc7a... Author: Vincent Massol <[email protected]> Date: 2026-07-26 (Sun, 26 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) Commit: 9e2d508692f22a119d165572b69bcd8c62c36d32 https://github.com/xwiki/xwiki-platform/commit/9e2d508692f22a119d165572b69bc... Author: Vincent Massol <[email protected]> Date: 2026-07-26 (Sun, 26 Jul 2026) Changed paths: M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Log Message: ----------- [Misc] Fix remaining SonarQube-reported NPE risks blocking the quality gate * copyAttachment: getXWikiContext() can return null, so reuse the captured context and guard the author reference lookup instead of dereferencing a possibly-null context a second time. * backupContext: require a non-null context up front, since all the data backed up below is read from it. * Annotate getXWikiContext() with @Nullable to document that it can return null (which is what makes the direct dereferences above unsafe). (cherry picked from commit de737018e980d44e177dcf801c5e13d2239a2ba5) Compare: https://github.com/xwiki/xwiki-platform/compare/e0662cfe0a00%5E...9e2d508692... To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications