File tree 1 file changed +5
-3
lines changed
protobuf/src/main/java/com/fasterxml/jackson/dataformat/protobuf
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1086,6 +1086,7 @@ public String nextFieldName() throws IOException
1086
1086
if (_skipUnknownField (id , wireType ) != JsonToken .FIELD_NAME ) {
1087
1087
return null ;
1088
1088
}
1089
+ // sub-optimal as skip method already set it, but:
1089
1090
}
1090
1091
String name = _currentField .name ;
1091
1092
_parsingContext .setCurrentName (name );
@@ -1119,9 +1120,10 @@ public String nextFieldName() throws IOException
1119
1120
1120
1121
ProtobufField f = _findField (id );
1121
1122
if (f == null ) {
1122
- _skipUnknownField (id , wireType );
1123
- // may or may not match, but let caller figure it out
1124
- return null ;
1123
+ if (_skipUnknownField (id , wireType ) != JsonToken .FIELD_NAME ) {
1124
+ return null ;
1125
+ }
1126
+ // sub-optimal as skip method already set it, but:
1125
1127
}
1126
1128
final String name = _currentField .name ;
1127
1129
_parsingContext .setCurrentName (name );
You can’t perform that action at this time.
0 commit comments