JDK-8035437 : Xerces Update: xml/serialize/DOMSerializerImpl
  • Type: Bug
  • Component: xml
  • Sub-Component: org.w3c.dom
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-02-20
  • Updated: 2022-09-01
  • Resolved: 2014-03-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9 Other Other
9 b08Fixed naResolved na,openjdk8u332Resolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
Update JDK/JAXP from Xerces: 

http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xml/serialize/DOMSerializerImpl.java?view=log

Include Revisions:
            944789, 923974, 603454, 450971, 410017,409928, 381248, 381247

Fixed bugs:
           XERCESJ-1007 Major AbstractMethodError is not caught in DOMSerializerImpl.writeToString() and ...

Exclude Revisions:
            476047, 473125

Reason to exclude:
            Need to review XERCESJ-1210

Revisions already in JAXP sources:
            Verified that revisions prior to and including 381247 are in JAXP sources already

Bug fixes already in JAXP sources: 
           XERCESJ-1116 Major format-pretty-print
           XERCESJ-1117 Major LSException should contain cause exception
           XERCESJ-916 Case-sensitivity with LSParser.domConfig
           XERCESJ-865 A few problems with the DOM Level 3 DOMConfiguration implementation


Comments
Changeset: f645a751 Author: Aleksei Efimov <aefimov@openjdk.org> Date: 2014-03-31 19:03:41 +0000 URL: https://git.openjdk.org/shenandoah-jdk8u/commit/f645a7510a94404f8d9e4582d26a9411fd6c2e14
01-09-2022

Fix Request [8u] Requesting a backport to 8u as part of JDK-8238164, for Oracle parity. The JDK 9 fix required cosmetic changes to apply to 8u. 8u webrev: https://cr.openjdk.java.net/~ebaron/jdk8u/JDK-8035437/webrev.01/ Approved by phh: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-November/014438.html
26-11-2021

8u RFR: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-November/014429.html
19-11-2021

Note that Xalan serializer contains fix described in JDK-7150637.
21-08-2014

URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/776d2be27fff User: lana Date: 2014-04-09 18:28:21 +0000
09-04-2014

URL: http://hg.openjdk.java.net/jdk9/jdk9/jaxp/rev/93584f534ff5 User: lana Date: 2014-04-09 18:27:56 +0000
09-04-2014

URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/776d2be27fff User: aefimov Date: 2014-03-31 15:20:11 +0000
31-03-2014

URL: http://hg.openjdk.java.net/jdk9/dev/jaxp/rev/93584f534ff5 User: aefimov Date: 2014-03-31 15:19:13 +0000
31-03-2014

Tried to reproduce the bug described in XERCESJ-1007: Before regression test creation tried to follow up the description of this bug in here: https://issues.apache.org/jira/browse/XERCESJ-1007 1. Use java test file provided in apache bug. 2. Use crimson DocumentBuilderFactoryImpl by specifying the following java options: -cp ./crimson.jar -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentBuilderFactoryImpl crimson.jar - the latest crimson release (1.1.3) from http://xml.apache.org/dist/crimson/ 3. The testing result with different JDKs: JDK9,8,7,6: The bug can't be reproduced JDK5: got expected exception: Exception in thread "main" java.lang.AbstractMethodError: org.apache.crimson.tree.XmlDocument.getXmlVersion()Ljava/lang/String; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl.writeToString(DOMSerializerImpl.java:508) at AbstractMethodErrorTest.testWriteToString(AbstractMethodErrorTest.java:18) at AbstractMethodErrorTest.main(AbstractMethodErrorTest.java:23) The test cases seems valid to reproduce the problem reported in XERCES-1007, but not applicable for JDK9.
26-03-2014

The following revisions will be ported to related classes to address changes in DOMSerializerImpl class: DOMStringListImpl: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/dom/DOMStringListImpl.java?view=log Revisions to port: 603680, 603454 Revisions to ignore: 449328, 447266 XMLSerializer: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xml/serialize/XMLSerializer.java?view=log Revisions to port: 704573 699892 464369(XERCESJ-1197) 449487 405847 Revisions to ignore: 476047(XERCESJ-1210) 447253 XML11Serializer: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xml/serialize/XML11Serializer.java?view=log Revisions to port: 464369(XERCESJ-1197) 449487 405847 Revisions to ignore: 476047(XERCESJ-1210) 447253 BaseMarkupSerializer: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xml/serialize/BaseMarkupSerializer.java?view=log Revisions to port: 923974 699892 593274 464369(XERCESJ-1197) 449487 410017 405847 Revisions to ignore: 476047(XERCESJ-1210) 447253 XMLEntityManager: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/XMLEntityManager.java?view=log Revisions to port: 822684 791563 450971 (Port only these three revisions to address addition of createOutputStream() method - needed for DomSerializerImpl). Other changes for this class will ported separately because of high dependency on other Xerces classes.
18-03-2014

To update DOMSerializerImpl the following classes needs to be also updated: DOMStringListImpl, XMLSerializer, XML11Serializer, BaseMarkupSerializer, XMLEntityManager.
24-02-2014

I suggest copying the content of Xerces classes and then reapply the following patches: revision 632 and 646 https://java.net/projects/jaxp-sources/sources/svn/revision/632 https://java.net/projects/jaxp-sources/sources/svn/revision/646
21-02-2014

Excluded revisions 476047 and 473125 would be resolved in JDK-8035467.
20-02-2014