RFR: 8316383: NullPointerException in AbstractSAXParser after JDK-8306632
Naoto Sato
naoto at openjdk.org
Thu Sep 21 16:38:44 UTC 2023
On Tue, 19 Sep 2023 21:10:41 GMT, Joe Wang <joehw at openjdk.org> wrote:
> Fix a NPE. The DTD patch (JDK-8306632) moved initialization to factories, for example, for SAXParser, the SecurityManagers are created in the SAXParserFactory impl and passed on to instances of SAXParsers. The (deprecated) XMLReaderFactory however, instantiates SAXParsers directly, thus without initializing the SecurityManagers. This patch checks the condition and creates them if they have not already been constructed.
>
> Test: XML tests passed.
LGTM.
src/java.xml/share/classes/jdk/xml/internal/Utils.java line 42:
> 40: * and used to print out information related to the configuration of factories
> 41: * and processors
> 42: */
Super nit: indentation
-------------
Marked as reviewed by naoto (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/15828#pullrequestreview-1638286810
PR Review Comment: https://git.openjdk.org/jdk/pull/15828#discussion_r1333338758
More information about the core-libs-dev
mailing list