[xwiki/xwiki-platform] cdcb67: [Misc] Fix a SonarQube issue: a possible NPE when ...
Branch: refs/heads/sonar-editmoderesolver-npe Home: https://github.com/xwiki/xwiki-platform Commit: cdcb670447ec70a9d13103e68c1616eb3ccd86ce https://github.com/xwiki/xwiki-platform/commit/cdcb670447ec70a9d13103e68c161... Author: Vincent Massol <[email protected]> Date: 2026-08-30 (Sun, 30 Aug 2026) Changed paths: M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/edit/EditModeResolver.java M xwiki-platform-core/xwiki-platform-oldcore/src/test/java/com/xpn/xwiki/internal/edit/EditModeResolverTest.java Log Message: ----------- [Misc] Fix a SonarQube issue: a possible NPE when resolving the edit mode * EditModeResolver#getEditMode() read the translated document from the XWiki context ("tdoc") and dereferenced it without checking for null, while that context entry is absent when the edit mode is resolved outside of a request targeting a document. * Return the default WIKI edit mode in that case, since neither the sheets nor the document syntax can be looked up without a document. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications