-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
11
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
We have detected that an invalid XML file is written when using DOMNormalizer to normalize a document.
If you look at following code:
https://github.com/openjdk/jdk/blob/master/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java#L572:L583
It is totally different from the implementation in Xerces.
Is there any reason why this code is different? The Xerces implementation works fine.
Here's the Xerces implementation:
http://svn.apache.org/viewvc/xerces/java/tags/Xerces-J_2_12_0/src/org/apache/xerces/dom/NamedNodeMapImpl.java?view=markup#l577
Highlighting the problem:
- The Xerces implementation creates a new list when the list parameter is null
- The JDK implementation ignores the list parameter and overwrite it when "nodes" is not null.
We have detected that an invalid XML file is written when using DOMNormalizer to normalize a document.
If you look at following code:
https://github.com/openjdk/jdk/blob/master/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java#L572:L583
It is totally different from the implementation in Xerces.
Is there any reason why this code is different? The Xerces implementation works fine.
Here's the Xerces implementation:
http://svn.apache.org/viewvc/xerces/java/tags/Xerces-J_2_12_0/src/org/apache/xerces/dom/NamedNodeMapImpl.java?view=markup#l577
Highlighting the problem:
- The Xerces implementation creates a new list when the list parameter is null
- The JDK implementation ignores the list parameter and overwrite it when "nodes" is not null.