RFR: 8316383: NullPointerException in AbstractSAXParser after JDK-8306632

Lance Andersen lancea at openjdk.org
Thu Sep 21 15:53:40 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.

Marked as reviewed by lancea (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/15828#pullrequestreview-1638204539


More information about the core-libs-dev mailing list