-
Bug
-
Resolution: Fixed
-
P3
-
6u18
-
1.4
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2207328 | 7 | Joe Wang | P3 | Closed | Fixed | b112 |
JDK-2195015 | 6u22 | Abhijit Saha | P3 | Closed | Fixed | b01 |
JDK-2195637 | 6u21-rev | Abhijit Saha | P3 | Closed | Fixed | b08 |
JDK-2192041 | 6u20-rev | Abhijit Saha | P3 | Resolved | Fixed | b05 |
Starting with update 18 of JDK 1.6.0, the bundled XML Parser is omitting a characters callback to the content handler in the following scenario:
-Using XMLReader
-Set a javax.xml.validation.Schema on the XMLReader
-The schema contains an xs:any with processContents="skip"
-Parse an XML document which has an element containing a text node for the any
-The characters method on the ContentHandler is not invoked for the text contianed in the element
If the Schema isn't set on the SAXParserFactory then the characters method is called as expected. Also if the ProcessContents="skip" is removed, then the characters method is also called as expected. Finally in any JDK version previous to jdk1.6.0_18 the characters method is always called as expected.
A testcase has been attached.
How to reproduce:
Extract the attachment of this CR and go to the folder called xmlparser.characters.issue.
Run java test/Test with the JDK of your choice. 6u17 looks fine, but with 6u18 through 6u20 the issue is reproducible.
$ java -showversion test/Test
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Server VM (build 14.3-b01, mixed mode)
Parse InputStream:
Characters called:
Characters called: text
Characters called:
$ java -showversion test/Test
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Server VM (build 16.0-b13, mixed mode)
Parse InputStream:
$ java -showversion test/Test
java version "1.6.0_19"
Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
Java HotSpot(TM) Server VM (build 16.2-b04, mixed mode)
Parse InputStream:
$ java -showversion test/Test
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
Parse InputStream:
-Using XMLReader
-Set a javax.xml.validation.Schema on the XMLReader
-The schema contains an xs:any with processContents="skip"
-Parse an XML document which has an element containing a text node for the any
-The characters method on the ContentHandler is not invoked for the text contianed in the element
If the Schema isn't set on the SAXParserFactory then the characters method is called as expected. Also if the ProcessContents="skip" is removed, then the characters method is also called as expected. Finally in any JDK version previous to jdk1.6.0_18 the characters method is always called as expected.
A testcase has been attached.
How to reproduce:
Extract the attachment of this CR and go to the folder called xmlparser.characters.issue.
Run java test/Test with the JDK of your choice. 6u17 looks fine, but with 6u18 through 6u20 the issue is reproducible.
$ java -showversion test/Test
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Server VM (build 14.3-b01, mixed mode)
Parse InputStream:
Characters called:
Characters called: text
Characters called:
$ java -showversion test/Test
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Server VM (build 16.0-b13, mixed mode)
Parse InputStream:
$ java -showversion test/Test
java version "1.6.0_19"
Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
Java HotSpot(TM) Server VM (build 16.2-b04, mixed mode)
Parse InputStream:
$ java -showversion test/Test
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
Parse InputStream:
- backported by
-
JDK-2192041 XML parser omits characters callback to ContentHandler since 6u18
- Resolved
-
JDK-2195015 XML parser omits characters callback to ContentHandler since 6u18
- Closed
-
JDK-2195637 XML parser omits characters callback to ContentHandler since 6u18
- Closed
-
JDK-2207328 XML parser omits characters callback to ContentHandler since 6u18
- Closed
- relates to
-
JDK-6564400 setIgnoringContentElementWhitespace doesn't work with XSD (did in 1.5)
- Closed