RFR: 8323740: java.lang.ExceptionInInitializerError when trying to load XML classes in wrong order

Alan Bateman alanb at openjdk.org
Wed Dec 18 07:56:43 UTC 2024


On Wed, 18 Dec 2024 02:38:28 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:

> Please consider this fix for [JDK-8323740](https://bugs.openjdk.org/browse/JDK-8323740), which avoids an `ExceptionInInitializerError` in the class initializer of `XMLDocumentFragmentScannerImpl` and other classes that have a circular dependency on `jdk.xml.internal.JdkXmlUtils`. The change breaks the cycle by moving some initialization out of the class initializer of `JdkXmlUtils`.

No objection to the change but is this only an issue when something is reflectively load java.xml internal classes? Can it arise when using just the exported/supported API?

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

PR Comment: https://git.openjdk.org/jdk/pull/22803#issuecomment-2550599326


More information about the core-libs-dev mailing list