Branch: refs/heads/stable-18.4.x Home: https://github.com/xwiki/xwiki-platform Commit: 0bc12ca965034cda34db9269408f897941ed5e9c https://github.com/xwiki/xwiki-platform/commit/0bc12ca965034cda34db9269408f8... Author: Vincent Massol <[email protected]> Date: 2026-07-24 (Fri, 24 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). To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications