@@ -516,7 +516,7 @@ public JsonToken nextToken() throws JacksonException
516516 _tokenInputTotal = _currInputProcessed + _inputPtr ;
517517
518518 // also: clear any data retained for previous token
519- clearRetainedValues ();
519+ _clearRetainedValues ();
520520
521521 // First: need to keep track of lengths of defined-length Arrays and
522522 // Objects (to materialize END_ARRAY/END_OBJECT as necessary);
@@ -1148,7 +1148,7 @@ public boolean nextName(SerializableString str) throws JacksonException
11481148 }
11491149 _tokenInputTotal = _currInputProcessed + _inputPtr ;
11501150 // need to clear retained values for previous token
1151- clearRetainedValues ();
1151+ _clearRetainedValues ();
11521152 _tagValues .clear ();
11531153 // completed the whole Object?
11541154 if (!_streamReadContext .expectMoreValues ()) {
@@ -1208,7 +1208,7 @@ public String nextName() throws JacksonException
12081208 }
12091209 _tokenInputTotal = _currInputProcessed + _inputPtr ;
12101210 // need to clear retained values for previous token
1211- clearRetainedValues ();
1211+ _clearRetainedValues ();
12121212 _tagValues .clear ();
12131213 // completed the whole Object?
12141214 if (!_streamReadContext .expectMoreValues ()) {
@@ -1309,12 +1309,11 @@ public boolean nextName(SerializableString str) throws JacksonException
13091309 {
13101310 // Two parsing modes; can only succeed if expecting field name, so handle that first:
13111311 if (_streamReadContext.inObject() && _currToken != JsonToken.PROPERTY_NAME) {
1312- _numTypesValid = NR_UNKNOWN;
13131312 if (_tokenIncomplete) {
13141313 _skipIncomplete();
13151314 }
13161315 _tokenInputTotal = _currInputProcessed + _inputPtr;
1317- _binaryValue = null ;
1316+ _clearRetainedValues() ;
13181317 _tagValues.clear();
13191318 // completed the whole Object?
13201319 if (!_streamReadContext.expectMoreValues()) {
@@ -1371,7 +1370,7 @@ public int nextNameMatch(PropertyNameMatcher matcher) throws JacksonException
13711370 _skipIncomplete ();
13721371 }
13731372 _tokenInputTotal = _currInputProcessed + _inputPtr ;
1374- clearRetainedValues ();
1373+ _clearRetainedValues ();
13751374 _tagValues .clear ();
13761375 _sharedString = null ;
13771376 // completed the whole Object?
@@ -4011,9 +4010,9 @@ protected JsonToken _eofAsNextToken() throws JacksonException {
40114010 }
40124011
40134012 /*
4014- /**********************************************************
4013+ /**********************************************************************
40154014 /* Internal methods, error handling, reporting
4016- /**********************************************************
4015+ /**********************************************************************
40174016 */
40184017
40194018 protected void _invalidToken (int ch ) throws StreamReadException {
@@ -4082,29 +4081,29 @@ private String _reportTruncatedUTF8InName(int strLenBytes, int truncatedCharOffs
40824081
40834082 private final static BigInteger BIT_63 = BigInteger .ONE .shiftLeft (63 );
40844083
4085- private final BigInteger _bigPositive (long l ) {
4084+ protected final BigInteger _bigPositive (long l ) {
40864085 BigInteger biggie = BigInteger .valueOf ((l << 1 ) >>> 1 );
40874086 return biggie .or (BIT_63 );
40884087 }
40894088
4090- private final BigInteger _bigNegative (long l ) {
4089+ protected final BigInteger _bigNegative (long l ) {
40914090 // 03-Dec-2017, tatu: [dataformats-binary#124] Careful with overflow
40924091 BigInteger unsignedBase = _bigPositive (l );
40934092 return unsignedBase .negate ().subtract (BigInteger .ONE );
40944093 }
40954094
4096- private void createChildArrayContext (final int len ) throws JacksonException {
4095+ protected void createChildArrayContext (final int len ) throws JacksonException {
40974096 _streamReadContext = _streamReadContext .createChildArrayContext (len );
40984097 _streamReadConstraints .validateNestingDepth (_streamReadContext .getNestingDepth ());
40994098 }
41004099
4101- private void createChildObjectContext (final int len ) throws JacksonException {
4100+ protected void createChildObjectContext (final int len ) throws JacksonException {
41024101 _streamReadContext = _streamReadContext .createChildObjectContext (len );
41034102 _streamReadConstraints .validateNestingDepth (_streamReadContext .getNestingDepth ());
41044103 }
41054104
41064105 // @since 2.20
4107- private void clearRetainedValues () {
4106+ protected void _clearRetainedValues () {
41084107 _numTypesValid = NR_UNKNOWN ;
41094108 _binaryValue = null ;
41104109 _simpleValue = null ;
0 commit comments