Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[birt-dev]CheckIn [128380] XML data sets from large files are tearing

-Summary:

Fix bugzilla bug 128380 XML data sets from large files are tearing.

 

-Bugzilla Bug (s) Resolved:

Bug 128380

 

-Description:

XParser use Xerces to parse xml files. Specially, it will override method
org.xml.sax.helpers.DefaultHandler.characters(char[], int start, int length) to
rechieve value of an xml element.

In the Xerces2 Java Parser 2.6.2 implementation (the one xml driver used), the
first argument, that is, char[], which is a cache of xml input stream, passed
by the Xerces parser would always be of 2048 bytes in length. If a value of an
xml element exceeds 2048 bytes, or only parts of its value being cached on the
rear of the char array, then the method characters() will be called multiple
times so that the whole value could be achieved.

The xml driver implementation missed this implementation detail of Xerces
parser so that cause the loss of some information.

Fix this bug in source. The accompany test cases are added as well.


-Tests Description:
Unit Test

 

-Files Added:

"/org.eclipse.birt.report.data.oda.xml/test/org/eclipse/birt/report/data/oda/xml/input/critical.xml"

 

-Files Edited:

"/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/SaxParser.java"

"/org.eclipse.birt.report.data.oda.xml/test/org/eclipse/birt/report/data/oda/xml/util/SaxParserTest.java"

"/org.eclipse.birt.report.data.oda.xml/test/org/eclipse/birt/report/data/oda/xml/golden/SaxParserTest.test8.txt" "/org.eclipse.birt.report.data.oda.xml/test/org/eclipse/birt/report/data/oda/xml/test/util/TestConstants.java"

 

- Notes to Build Team:
- Notes to Developers:
- Notes to QA: 
 

- Notes to Documentation:


Back to the top