File tree 1 file changed +15
-2
lines changed
src/main/java/com/fasterxml/jackson/dataformat/xml/deser
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,7 @@ public JsonToken nextToken() throws IOException
472
472
return t;
473
473
}
474
474
*/
475
-
475
+
476
476
// public JsonToken nextToken0() throws IOException
477
477
@ Override
478
478
public JsonToken nextToken () throws IOException
@@ -558,7 +558,10 @@ public JsonToken nextToken() throws IOException
558
558
_parsingContext = _parsingContext .createChildObjectContext (-1 , -1 );
559
559
return (_currToken = JsonToken .START_OBJECT );
560
560
}
561
- return (_currToken = JsonToken .VALUE_NULL );
561
+ // 07-Sep-2019, tatu: for [dataformat-xml#353], must NOT return second null
562
+ if (_currToken != JsonToken .VALUE_NULL ) {
563
+ return (_currToken = JsonToken .VALUE_NULL );
564
+ }
562
565
}
563
566
_currToken = _parsingContext .inArray () ? JsonToken .END_ARRAY : JsonToken .END_OBJECT ;
564
567
_parsingContext = _parsingContext .getParent ();
@@ -636,6 +639,16 @@ public JsonToken nextToken() throws IOException
636
639
/**********************************************************
637
640
*/
638
641
642
+ /*
643
+ @Override
644
+ public String nextFieldName() throws IOException {
645
+ if (nextToken() == JsonToken.FIELD_NAME) {
646
+ return getCurrentName();
647
+ }
648
+ return null;
649
+ }
650
+ */
651
+
639
652
/**
640
653
* Method overridden to support more reliable deserialization of
641
654
* String collections.
You can’t perform that action at this time.
0 commit comments