RFR: 8354774: DocumentBuilderFactory getAttribute throws NPE
Naoto Sato
naoto at openjdk.org
Fri Apr 18 20:09:45 UTC 2025
On Thu, 17 Apr 2025 17:41:56 GMT, Joe Wang <joehw at openjdk.org> wrote:
> Fix a NPE on calling DocumentBuilderFactory::getAttribute. This issue was found during the previous JCK test (JCK-7322355). The JCK failure was from a different method call, but it appears this is the root cause.
>
> Also in this patch: consolidates get and set properties to use the same Util methods to reduce potential errors when code changes.
>
> Test:
> Tier1 - 3 passed
> JCK test passed (will update JCK-7322355 once this patch is integrated)
Looks good to me. Some minor comments follow
src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/PropertyManager.java line 261:
> 259: //fall back to the existing property manager
> 260: supportedProps.put(property, value);
> 261: }
`JdkProperty` and `FeaturePropertyBase` can be removed from `import`. Applies to other sources as well
src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java line 112:
> 110: public static boolean setProperty(XMLSecurityManager xsm, XMLSecurityPropertyManager xspm,
> 111: String property, Object value) {
> 112: String pName;
`pName` is not needed
-------------
PR Review: https://git.openjdk.org/jdk/pull/24732#pullrequestreview-2779317350
PR Review Comment: https://git.openjdk.org/jdk/pull/24732#discussion_r2051066519
PR Review Comment: https://git.openjdk.org/jdk/pull/24732#discussion_r2051056587
More information about the core-libs-dev
mailing list