JDK-8067104 : Parsing XML 1.1 files with SAX gives unexpected results
  • Type: Bug
  • Component: xml
  • Sub-Component: org.xml.sax
  • Affected Version: 7u67
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: os_x
  • CPU: x86
  • Submitted: 2014-09-23
  • Updated: 2016-02-24
  • Resolved: 2016-02-24
Related Reports
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Mac OS X 10.9.5
13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64


A DESCRIPTION OF THE PROBLEM :
When parsing files that declare themselves as XML Version 1.1, raw XML gets passed into org.xml.sax.helpers.DefaultHandler.

This looks awfully similar to OpenJDK Issue JDK-8012541: https://bugs.openjdk.java.net/browse/JDK-8012541 but this time for SAX instead of DOM.

This is fixed in 1.8.0_20 but can be reproduced on 1.6.0 (tried u51 and upwards).

Source code that exposes this bug is available at https://github.com/criege/java-bugs/tree/master/src/bugs/xml

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Look at https://github.com/criege/java-bugs/tree/master/src/bugs/xml

Running this with "-ea" makes the assert statement fail. If you look at the output note the following line before the assertion fails:

-- snip --
FI/19000101/99991231
91/tDescrip/99991231
-- /snip --

It looks like the raw XML is passed into the DefaultHandler.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Assertion does not fail
ACTUAL -
Assertion fails

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
https://github.com/criege/java-bugs/tree/master/src/bugs/xml
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Setting the XML version in the input file to "1.0" resolves this.


Comments
Response from the submitter: It���s reproducible with 7u51, see attached output. It���s not present in Java 8. And in the meantime it looks like it has been fixed as of 7u71 (7u67 still exposes the bug) and 6u81. I���ve updated the page on github accordingly: https://github.com/criege/java-bugs/tree/master/src/bugs/xml
11-12-2014

Sent an email to submitter: "Please confirm if you can reproduce this issue with JDK 7u51 (January release) and JDK 8?"
10-12-2014

ask submitter to retest with January releases
09-12-2014

Not enough information.
24-09-2014