This is an automated email from the ASF dual-hosted git repository. garydgregory pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/commons-xml.git
commit 3849d7ffd04c25d39902ef7b151fc73f420d7986 Author: Gary Gregory <[email protected]> AuthorDate: Fri Aug 28 14:17:21 2026 -0400 Name like in the JRE example in MethodHandles.Lookup.findStatic(). --- src/main/java/org/apache/commons/xml/SecureSAXParserFactory.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/xml/SecureSAXParserFactory.java b/src/main/java/org/apache/commons/xml/SecureSAXParserFactory.java index 55a81d3..0976690 100644 --- a/src/main/java/org/apache/commons/xml/SecureSAXParserFactory.java +++ b/src/main/java/org/apache/commons/xml/SecureSAXParserFactory.java @@ -72,7 +72,7 @@ public final class SecureSAXParserFactory { /** System property naming the {@link SAXParserFactory} implementation, the JDK's own mechanism for reconfiguring the default parser. */ private static final String SAX_FACTORY_ID = "javax.xml.parsers.SAXParserFactory"; - private static final MethodHandle NEW_DEFAULT_INSTANCE = MethodHandleFactory.findStatic(SAXParserFactory.class, "newDefaultInstance", + private static final MethodHandle MH_newDefaultInstance = MethodHandleFactory.findStatic(SAXParserFactory.class, "newDefaultInstance", MethodType.methodType(SAXParserFactory.class)); /** @@ -179,10 +179,10 @@ private static SAXParserFactory makeNSAware(final SAXParserFactory factory) { * (for example Android). */ public static SAXParserFactory newDefaultInstance() { - if (NEW_DEFAULT_INSTANCE != null) { + if (MH_newDefaultInstance != null) { final SAXParserFactory factory; try { - factory = (SAXParserFactory) NEW_DEFAULT_INSTANCE.invokeExact(); + factory = (SAXParserFactory) MH_newDefaultInstance.invokeExact(); } catch (final FactoryConfigurationError e) { throw e; } catch (final Throwable e) {
