[xwiki/xwiki-commons] 0b0b84: [Misc] Fix SonarCloud javabugs:S2259 false positiv...
Branch: refs/heads/misc-sonar-xml-factory-null-analysis Home: https://github.com/xwiki/xwiki-commons Commit: 0b0b84766487416e2da478233f708cea930cb7eb https://github.com/xwiki/xwiki-commons/commit/0b0b84766487416e2da478233f708c... 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) * 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