Skip to content

Commit eafd480

Browse files
committed
Merge branch '2.10' into 2.11
2 parents 150bfd8 + d569992 commit eafd480

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Diff for: src/main/java/com/fasterxml/jackson/databind/util/TokenBuffer.java

+2
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,8 @@ public JsonToken nextToken() throws IOException
15831583
|| _currToken == JsonToken.END_ARRAY) {
15841584
// Closing JSON Object/Array? Close matching context
15851585
_parsingContext = _parsingContext.parentOrCopy();
1586+
} else {
1587+
_parsingContext.updateForValue();
15861588
}
15871589
return _currToken;
15881590
}

Diff for: src/main/java/com/fasterxml/jackson/databind/util/TokenBufferReadContext.java

+17
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,14 @@ public static TokenBufferReadContext createRootContext(JsonStreamContext origCon
9292
}
9393

9494
public TokenBufferReadContext createChildArrayContext() {
95+
// For current context there will be one next Array value, first:
96+
++_index;
9597
return new TokenBufferReadContext(this, TYPE_ARRAY, -1);
9698
}
9799

98100
public TokenBufferReadContext createChildObjectContext() {
101+
// For current context there will be one next Object value, first:
102+
++_index;
99103
return new TokenBufferReadContext(this, TYPE_OBJECT, -1);
100104
}
101105

@@ -132,4 +136,17 @@ public TokenBufferReadContext parentOrCopy() {
132136
public void setCurrentName(String name) throws JsonProcessingException {
133137
_currentName = name;
134138
}
139+
140+
/*
141+
/**********************************************************
142+
/* Extended support for context updates
143+
/**********************************************************
144+
*/
145+
146+
/**
147+
* @since 2.10.1
148+
*/
149+
public void updateForValue() {
150+
++_index;
151+
}
135152
}

0 commit comments

Comments
 (0)