Skip to content

Commit

Permalink
Minor fix wrt #353
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Sep 7, 2019
1 parent f8db60e commit 648d5f9
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ public JsonToken nextToken() throws IOException
return t;
}
*/

// public JsonToken nextToken0() throws IOException
@Override
public JsonToken nextToken() throws IOException
Expand Down Expand Up @@ -558,7 +558,10 @@ public JsonToken nextToken() throws IOException
_parsingContext = _parsingContext.createChildObjectContext(-1, -1);
return (_currToken = JsonToken.START_OBJECT);
}
return (_currToken = JsonToken.VALUE_NULL);
// 07-Sep-2019, tatu: for [dataformat-xml#353], must NOT return second null
if (_currToken != JsonToken.VALUE_NULL) {
return (_currToken = JsonToken.VALUE_NULL);
}
}
_currToken = _parsingContext.inArray() ? JsonToken.END_ARRAY : JsonToken.END_OBJECT;
_parsingContext = _parsingContext.getParent();
Expand Down Expand Up @@ -636,6 +639,16 @@ public JsonToken nextToken() throws IOException
/**********************************************************
*/

/*
@Override
public String nextFieldName() throws IOException {
if (nextToken() == JsonToken.FIELD_NAME) {
return getCurrentName();
}
return null;
}
*/

/**
* Method overridden to support more reliable deserialization of
* String collections.
Expand Down

0 comments on commit 648d5f9

Please sign in to comment.