@@ -699,7 +699,7 @@ private boolean _checkEnd() throws IOException
699
699
private JsonToken _handleRootKey (int tag ) throws IOException
700
700
{
701
701
int wireType = (tag & 0x7 );
702
- int id = (tag >> 3 );
702
+ final int id = (tag >> 3 );
703
703
704
704
ProtobufField f ;
705
705
if (_currentField != null ) {
@@ -997,11 +997,11 @@ public boolean nextFieldName(SerializableString sstr) throws IOException
997
997
return false ;
998
998
}
999
999
}
1000
- int tag = _decodeVInt ();
1000
+ final int tag = _decodeVInt ();
1001
1001
// inlined _handleRootKey()
1002
1002
1003
- int wireType = (tag & 0x7 );
1004
- int id = (tag >> 3 );
1003
+ final int wireType = (tag & 0x7 );
1004
+ final int id = (tag >> 3 );
1005
1005
1006
1006
ProtobufField f = _findField (id );
1007
1007
if (f == null ) {
@@ -1033,11 +1033,11 @@ public boolean nextFieldName(SerializableString sstr) throws IOException
1033
1033
_currToken = JsonToken .END_OBJECT ;
1034
1034
return false ;
1035
1035
}
1036
- int tag = _decodeVInt ();
1036
+ final int tag = _decodeVInt ();
1037
1037
// inlined '_handleNestedKey()'
1038
1038
1039
- int wireType = (tag & 0x7 );
1040
- int id = (tag >> 3 );
1039
+ final int wireType = (tag & 0x7 );
1040
+ final int id = (tag >> 3 );
1041
1041
1042
1042
ProtobufField f = _findField (id );
1043
1043
if (f == null ) {
@@ -1078,18 +1078,20 @@ public String nextFieldName() throws IOException
1078
1078
return null ;
1079
1079
}
1080
1080
}
1081
- int tag = _decodeVInt ();
1081
+ final int tag = _decodeVInt ();
1082
1082
// inlined _handleRootKey()
1083
1083
1084
1084
int wireType = (tag & 0x7 );
1085
- int id = (tag >> 3 );
1085
+ final int id = (tag >> 3 );
1086
1086
1087
1087
ProtobufField f = _findField (id );
1088
1088
if (f == null ) {
1089
1089
if (_skipUnknownField (id , wireType ) != JsonToken .FIELD_NAME ) {
1090
1090
return null ;
1091
1091
}
1092
1092
// sub-optimal as skip method already set it, but:
1093
+ // [dataformats-binary#202]: need to reset after skipping
1094
+ wireType = _currentField .wireType ;
1093
1095
}
1094
1096
String name = _currentField .name ;
1095
1097
_parsingContext .setCurrentName (name );
@@ -1115,18 +1117,20 @@ public String nextFieldName() throws IOException
1115
1117
_currToken = JsonToken .END_OBJECT ;
1116
1118
return null ;
1117
1119
}
1118
- int tag = _decodeVInt ();
1120
+ final int tag = _decodeVInt ();
1119
1121
// inlined '_handleNestedKey()'
1120
1122
1121
1123
int wireType = (tag & 0x7 );
1122
- int id = (tag >> 3 );
1124
+ final int id = (tag >> 3 );
1123
1125
1124
1126
ProtobufField f = _findField (id );
1125
1127
if (f == null ) {
1126
1128
if (_skipUnknownField (id , wireType ) != JsonToken .FIELD_NAME ) {
1127
1129
return null ;
1128
1130
}
1129
1131
// sub-optimal as skip method already set it, but:
1132
+ // [dataformats-binary#202]: need to reset after skipping
1133
+ wireType = _currentField .wireType ;
1130
1134
}
1131
1135
final String name = _currentField .name ;
1132
1136
_parsingContext .setCurrentName (name );
@@ -2111,7 +2115,6 @@ protected ByteArrayBuilder _getByteArrayBuilder() {
2111
2115
return _byteArrayBuilder ;
2112
2116
}
2113
2117
2114
- @ SuppressWarnings ("deprecation" )
2115
2118
protected void _closeInput () throws IOException {
2116
2119
if (_inputStream != null ) {
2117
2120
if (_ioContext .isResourceManaged () || isEnabled (JsonParser .Feature .AUTO_CLOSE_SOURCE )) {
0 commit comments