[xwiki/xwiki-commons] b816ff: [Misc] Fix SonarCloud javabugs:S2259 false positiv...
Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-commons Commit: b816ff883bc9edf8b27b53f2fb7c7704a47d8bb7 https://github.com/xwiki/xwiki-commons/commit/b816ff883bc9edf8b27b53f2fb7c77... Author: Vincent Massol <[email protected]> Date: 2026-08-27 (Thu, 27 Aug 2026) Changed paths: M xwiki-commons-core/xwiki-commons-filter/xwiki-commons-filter-xml/src/main/java/org/xwiki/filter/xml/internal/input/XMLInputFilterStreamUtils.java M xwiki-commons-core/xwiki-commons-filter/xwiki-commons-filter-xml/src/main/java/org/xwiki/filter/xml/internal/output/XMLOutputFilterStreamUtils.java Log Message: ----------- [Misc] Fix SonarCloud javabugs:S2259 false positives in the XML filter stream utils (SonarQube) (#1928) * The single-argument createXMLEventReader()/createXMLStreamWriter() methods passed the default static factory to their two-argument overload, which then ran it through the null check of getXMLInputFactory()/getXMLOutputFactory(). Null analysis followed that path, concluded that the default factory could be null and reported a guaranteed NullPointerException on the calls dereferencing it. * Pass null instead, which is the documented way of asking for the default factory, so the default factory no longer flows through a null check. The behaviour is unchanged. * Also fix the output side, which has the same shape but was not reported yet. 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-commons/settings/notifications
participants (1)
-
XWiki Notifications