-
Bug
-
Resolution: Fixed
-
P3
-
7
-
1.4
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2207322 | 7 | Joe Wang | P3 | Closed | Fixed | b112 |
https://bugs.openjdk.java.net/show_bug.cgi?id=100123
Somebody ought to be very ashamed of this. XMLDOMWriterImpl cannot write more
that 20 nested elements without throwing an ArrayIndexOutOfBoundsException.
The following code demonstrates the problem:
import javax.xml.stream.*;
import javax.xml.transform.dom.*;
import org.w3c.dom.*;
import org.w3c.dom.bootstrap.*;
public class DOMWriter {
public static void main(String[] args)
throws Exception {
Document doc = DOMImplementationRegistry
.newInstance()
.getDOMImplementation("XML 3.0")
.createDocument("", "root", null);
XMLStreamWriter xsw = XMLOutputFactory
.newInstance()
.createXMLStreamWriter(new DOMResult(doc.getDocumentElement()));
for (int i = 0; i < 30; ++i) {
xsw.writeStartElement("nested");
}
}
}
Somebody ought to be very ashamed of this. XMLDOMWriterImpl cannot write more
that 20 nested elements without throwing an ArrayIndexOutOfBoundsException.
The following code demonstrates the problem:
import javax.xml.stream.*;
import javax.xml.transform.dom.*;
import org.w3c.dom.*;
import org.w3c.dom.bootstrap.*;
public class DOMWriter {
public static void main(String[] args)
throws Exception {
Document doc = DOMImplementationRegistry
.newInstance()
.getDOMImplementation("XML 3.0")
.createDocument("", "root", null);
XMLStreamWriter xsw = XMLOutputFactory
.newInstance()
.createXMLStreamWriter(new DOMResult(doc.getDocumentElement()));
for (int i = 0; i < 30; ++i) {
xsw.writeStartElement("nested");
}
}
}
- backported by
-
JDK-2207322 OpenJDK Bug 100123 XMLDOMWriterImpl throws ArrayIndexOutOfBoundsException
- Closed