Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-platform Commit: 4c13473c4abb8648a72aa23c7693a048777c37c3 https://github.com/xwiki/xwiki-platform/commit/4c13473c4abb8648a72aa23c7693a... Author: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Date: 2026-09-15 (Tue, 15 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/DownloadAction.java M xwiki-platform-core/xwiki-platform-oldcore/src/test/java/com/xpn/xwiki/web/DownloadActionTest.java Log Message: ----------- [Misc] Fix the SonarQube javabugs:S2259 issues of DownloadAction (#6288) DownloadAction#getAttachment() dereferences the document it is given, which its caller reads from XWikiContext#getDoc() and which is null when the URL didn't resolve to a document. Return no attachment in that case: the caller already handles a null result by re-parsing the URL, so a missing context document now ends in the regular "attachment not found" response instead of a NullPointerException. Claude-Session: https://claude.ai/code/session_01MpQRHF75UXk9WUFoQ1H2Qo Co-authored-by: Vincent Massol <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications