RFR (jaxp): JDK-8013434: Xalan and Xerces internal ObjectFactory need rework (original) (raw)

Daniel Fuchs daniel.fuchs at oracle.com
Mon Jun 3 16:54:18 UTC 2013


Hi,

In order to prepare for modularization, we need to review all the places where META-INF/services is parsed directly.

The Xalan and Xerces internal ObjectFactory still have some places where such parsing is implemented. The usual fix in such cases is to replace this 'ad-hoc' parsing by calls to j.u.ServiceLoader.

However:

  1. The method that parses META-INF in the Xerces ObjectFactory is never used - and therefore this patch simply removes it.

  2. The lookup implemented by the Xalan ObjectFactory is an internal undocumented mechanism - which in practice is not useful for the JDK itself (this is basically an internal pluggability layer which allows to replace the default implementation of DTMManager used by the XSLTC transformer).

    We are therefore proposing to also remove this pluggability - and simply make the JDK always use its own implementation of the DTMManager.

The consequence is that defining the system properties com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager and com.sun.org.apache.xml.internal.dtm.DTMManager, or defining concrete implementation classes for XSLTCDTMManager or DTMManager in META-INF/services will no longer have any effect:

com.sun.org.apache.xml.internal.dtm.DTMManager will always use its own default implementation, and com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager will also always use its own default implementation.

<http://cr.openjdk.java.net/~dfuchs/JDK-8013434/webrev.00/>

Since there are no changes to the public API we would also like to backport this change to the jdk7 update train in order to keep jdk7 and 8 in sync as much as we can.

best regards,

-- daniel



More information about the core-libs-dev mailing list