Skip to content

Commit 782e6e3

Browse files
committed
one more tiny tweak for previous #180 fix
1 parent 2d7683e commit 782e6e3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,12 @@ public boolean isExpectedStartArrayToken()
410410
_parsingContext.convertToArray();
411411
//System.out.println(" isExpectedArrayStart: OBJ->Array, wraps now: "+_parsingContext.getNamesToWrap());
412412
// And just in case a field name was to be returned, wipe it
413-
_nextToken = null;
413+
// 06-Jan-2015, tatu: Actually, could also be empty Object buffered; if so, convert...
414+
if (_nextToken == JsonToken.END_OBJECT) {
415+
_nextToken = JsonToken.END_ARRAY;
416+
} else {
417+
_nextToken = null;
418+
}
414419
// and last thing, [dataformat-xml#33], better ignore attributes
415420
_xmlTokens.skipAttributes();
416421
return true;

0 commit comments

Comments
 (0)