Skip to content

Commit 8fad301

Browse files
committed
tiny fix to nextFieldName() implementation of TokenBuffer
1 parent 67ebf73 commit 8fad301

File tree

2 files changed

+1986
-2
lines changed

2 files changed

+1986
-2
lines changed

src/main/java/com/fasterxml/jackson/databind/util/TokenBuffer.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,11 +1390,14 @@ public JsonToken nextToken() throws IOException
13901390
public String nextFieldName() throws IOException
13911391
{
13921392
// inlined common case from nextToken()
1393-
if (_closed || (_segment == null)) return null;
1393+
if (_closed || (_segment == null)) {
1394+
return null;
1395+
}
13941396

13951397
int ptr = _segmentPtr+1;
1396-
if (ptr < Segment.TOKENS_PER_SEGMENT && _segment.type(ptr) == JsonToken.FIELD_NAME) {
1398+
if ((ptr < Segment.TOKENS_PER_SEGMENT) && (_segment.type(ptr) == JsonToken.FIELD_NAME)) {
13971399
_segmentPtr = ptr;
1400+
_currToken = JsonToken.FIELD_NAME;
13981401
Object ob = _segment.get(ptr); // inlined _currentObject();
13991402
String name = (ob instanceof String) ? ((String) ob) : ob.toString();
14001403
_parsingContext.setCurrentName(name);

0 commit comments

Comments
 (0)