RFR (jaxp): 8016133 : Regression: diff. behavior with user-defined SAXParser
huizhe wang
huizhe.wang at oracle.com
Tue Jun 11 03:36:29 UTC 2013
Hi,
This is a quick fix on a regression caused by a previous patch. The
XMLReaderFactory uses a class variable (_jarread) to indicate if service
file has already been read. Along with this variable, there was another
(clsFromJar ) that caches the classname if found in a service file. The
2nd variable and its use were accidentally removed. As a result, the
following code would return the 3rd party impl on first call but then
fall back to the default impl on subsequent calls because reading
service file was skipped when _jarread is true:
XMLReader reader = XMLReaderFactory.createXMLReader();
System.out.println("1:" + reader.getClass().getName());
XMLReader reader2 = XMLReaderFactory.createXMLReader();
System.out.println("2:" + reader2.getClass().getName());
The fix is simply recover the original code. Here's the webrev:
http://cr.openjdk.java.net/~joehw/jdk8/8016133/webrev/
Thanks,
Joe
More information about the core-libs-dev
mailing list