RFR: 8316383: NullPointerException in AbstractSAXParser after JDK-8306632
Joe Wang
joehw at openjdk.org
Tue Sep 19 21:19:11 UTC 2023
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.
-------------
Commit messages:
- 8316383: NullPointerException in AbstractSAXParser after JDK-8306632
Changes: https://git.openjdk.org/jdk/pull/15828/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15828&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8316383
Stats: 78 lines in 3 files changed: 65 ins; 10 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/15828.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15828/head:pull/15828
PR: https://git.openjdk.org/jdk/pull/15828
More information about the core-libs-dev
mailing list