File tree 2 files changed +16
-1
lines changed
src/main/java/com/fasterxml/jackson/dataformat/xml/deser
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 4
4
<parent >
5
5
<groupId >com.fasterxml.jackson</groupId >
6
6
<artifactId >jackson-base</artifactId >
7
- <version >2.9.5 </version >
7
+ <version >2.9.6-SNAPSHOT </version >
8
8
</parent >
9
9
<groupId >com.fasterxml.jackson.dataformat</groupId >
10
10
<artifactId >jackson-dataformat-xml</artifactId >
Original file line number Diff line number Diff line change @@ -381,9 +381,24 @@ private final String _collectUntilTag() throws XMLStreamException
381
381
while (true ) {
382
382
switch (_xmlReader .next ()) {
383
383
case XMLStreamConstants .START_ELEMENT :
384
+ return (text == null ) ? "" : text ;
385
+
384
386
case XMLStreamConstants .END_ELEMENT :
385
387
case XMLStreamConstants .END_DOCUMENT :
388
+ // 04-May-2018, tatu: We could easily make <tag></tag> ALSO report
389
+ // as `null`, by below, but that breaks existing tests so not
390
+ // done at least until 3.0.
391
+ /*
392
+ if (text == null) {
393
+ if (FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL.enabledIn(_formatFeatures)) {
394
+ return null;
395
+ }
396
+ return "";
397
+ }
398
+ return text;
399
+ */
386
400
return (text == null ) ? "" : text ;
401
+
387
402
// note: SPACE is ignorable (and seldom seen), not to be included
388
403
case XMLStreamConstants .CHARACTERS :
389
404
case XMLStreamConstants .CDATA :
You can’t perform that action at this time.
0 commit comments