Skip to content

Commit d7f343a

Browse files
committed
Fix a minor 3.0-specific edge case wrt #177
1 parent 1e23fa5 commit d7f343a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroStructureReader.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ protected AvroStructureReader(AvroReadContext parent, int type, String typeId) {
3030
*<p>
3131
* Note: Arrays can not return {@code true} as they need to encode length
3232
* even for "empty" arrays.
33-
*
34-
* @since 2.10
3533
*/
3634
public boolean consumesNoContent() {
3735
return false;

avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/RecordReader.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ public String nextFieldName() throws IOException
164164
return name;
165165
}
166166
_nextAtEndObject();
167+
} else if (_state == STATE_END) {
168+
_nextAtEndObject();
167169
} else {
168170
nextToken();
169171
}
@@ -182,6 +184,10 @@ public int nextFieldName(FieldNameMatcher matcher) throws IOException {
182184
}
183185
return _matchAtEndObject();
184186
}
187+
if (_state == STATE_END) {
188+
return _matchAtEndObject();
189+
}
190+
// 26-Aug-2019, tatu: Is this correct thing to do?
185191
nextToken();
186192
return FieldNameMatcher.MATCH_ODD_TOKEN;
187193
}

0 commit comments

Comments
 (0)