File tree Expand file tree Collapse file tree 4 files changed +25
-1
lines changed
core/src/java/org/jdom2/input
test/src/java/org/jdom2/test/cases/output Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ public void writeCharacters(final String chars) throws XMLStreamException {
460460 if (parent instanceof Element ) {
461461 if (activetext != null ) {
462462 activetext .append (chars );
463- } else {
463+ } else if ( chars . length () > 0 ) {
464464 activetext = factory .text (chars );
465465 factory .addContent (parent , activetext );
466466 }
Original file line number Diff line number Diff line change 6060
6161@ SuppressWarnings ("javadoc" )
6262public final class TestStAXEventOutputter extends AbstractTestOutputter {
63+
64+ // ******************************************************************************
65+ // ******************************************************************************
66+ // StAX is really ugly - it breaks SurrogatePair handling with non-UTF8 encoding
67+ // As a result, some of these test cases fail in Recent Java versions
68+ // - most test*Surrogate*Pair tests.
69+ // ******************************************************************************
70+ // ******************************************************************************
6371
6472 private final static XMLOutputFactory soutfactory = XMLOutputFactory .newInstance ();
6573 private final static XMLInputFactory sinfactory = XMLInputFactory .newInstance ();
Original file line number Diff line number Diff line change 1515
1616@ SuppressWarnings ("javadoc" )
1717public class TestStAXReader2Writer extends AbstractTestRoundTrip {
18+
19+ // ******************************************************************************
20+ // ******************************************************************************
21+ // StAX is really ugly - it has broken namespace and comment handling
22+ // As a result, some of these test cases fail
23+ // testComplex - because StAX ignores a Comment content
24+ // testNamespaces - because StAX Can't handle redeclaring default Namespace to ""
25+ // ******************************************************************************
26+ // ******************************************************************************
1827
1928 @ Override
2029 Document prepare (Document doc ) {
Original file line number Diff line number Diff line change 5555@ SuppressWarnings ("javadoc" )
5656public final class TestStAXStreamOutputter extends AbstractTestOutputter {
5757
58+ // ******************************************************************************
59+ // ******************************************************************************
60+ // StAX is really ugly - it breaks SurrogatePair handling with non-UTF8 encoding
61+ // As a result, some of these test cases fail in Recent Java versions
62+ // - most test*Surrogate*Pair tests.
63+ // ******************************************************************************
64+ // ******************************************************************************
5865
5966 private static final XMLOutputFactory soutfactory = XMLOutputFactory .newInstance ();
6067 private static final XMLInputFactory sinfactory = XMLInputFactory .newInstance ();
You can’t perform that action at this time.
0 commit comments