From 21c94df8fcfcd15c8441d18a433c89a801a0469b Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Mon, 27 Jun 2022 17:22:10 -0700 Subject: [PATCH] Minor renaming for clarity --- .../jackson/core/json/ReaderBasedJsonParser.java | 12 ++++++------ .../jackson/core/json/UTF8DataInputJsonParser.java | 8 ++++---- .../jackson/core/json/UTF8StreamJsonParser.java | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/fasterxml/jackson/core/json/ReaderBasedJsonParser.java b/src/main/java/com/fasterxml/jackson/core/json/ReaderBasedJsonParser.java index 3318b4741d..3640d8af12 100644 --- a/src/main/java/com/fasterxml/jackson/core/json/ReaderBasedJsonParser.java +++ b/src/main/java/com/fasterxml/jackson/core/json/ReaderBasedJsonParser.java @@ -799,7 +799,7 @@ public final JsonToken nextToken() throws IOException case '7': case '8': case '9': - t = _parsePosNumber(i); + t = _parseUnsignedNumber(i); break; default: t = _handleOddValue(i); @@ -1002,7 +1002,7 @@ public String nextFieldName() throws IOException case '7': case '8': case '9': - t = _parsePosNumber(i); + t = _parseUnsignedNumber(i); break; case 'f': _matchFalse(); @@ -1081,7 +1081,7 @@ private final void _isNextTokenNameYes(int i) throws IOException case '7': case '8': case '9': - _nextToken = _parsePosNumber(i); + _nextToken = _parseUnsignedNumber(i); return; } _nextToken = _handleOddValue(i); @@ -1126,7 +1126,7 @@ protected boolean _isNextTokenNameMaybe(int i, String nameToMatch) throws IOExce case '7': case '8': case '9': - t = _parsePosNumber(i); + t = _parseUnsignedNumber(i); break; case 'f': _matchFalse(); @@ -1194,7 +1194,7 @@ private final JsonToken _nextTokenNotInObject(int i) throws IOException case '7': case '8': case '9': - return (_currToken = _parsePosNumber(i)); + return (_currToken = _parseUnsignedNumber(i)); /* * This check proceeds only if the Feature.ALLOW_MISSING_VALUES is enabled * The Check is for missing values. In case of missing values in an array, the next token will be either ',' or ']'. @@ -1373,7 +1373,7 @@ protected final JsonToken _parseFloatThatStartsWithPeriod(final boolean neg, * @throws IOException for low-level read issues, or * {@link JsonParseException} for decoding problems */ - protected final JsonToken _parsePosNumber(int ch) throws IOException + protected final JsonToken _parseUnsignedNumber(int ch) throws IOException { /* Although we will always be complete with respect to textual * representation (that is, all characters will be parsed), diff --git a/src/main/java/com/fasterxml/jackson/core/json/UTF8DataInputJsonParser.java b/src/main/java/com/fasterxml/jackson/core/json/UTF8DataInputJsonParser.java index 2e484b7518..8582381fd8 100644 --- a/src/main/java/com/fasterxml/jackson/core/json/UTF8DataInputJsonParser.java +++ b/src/main/java/com/fasterxml/jackson/core/json/UTF8DataInputJsonParser.java @@ -680,7 +680,7 @@ public JsonToken nextToken() throws IOException case '7': case '8': case '9': - t = _parsePosNumber(i); + t = _parseUnsignedNumber(i); break; case 'f': _matchToken("false", 1); @@ -749,7 +749,7 @@ private final JsonToken _nextTokenNotInObject(int i) throws IOException case '7': case '8': case '9': - return (_currToken = _parsePosNumber(i)); + return (_currToken = _parseUnsignedNumber(i)); } return (_currToken = _handleUnexpectedValue(i)); } @@ -863,7 +863,7 @@ public String nextFieldName() throws IOException case '7': case '8': case '9': - t = _parsePosNumber(i); + t = _parseUnsignedNumber(i); break; case 'f': _matchToken("false", 1); @@ -1044,7 +1044,7 @@ protected final JsonToken _parseFloatThatStartsWithPeriod(final boolean neg, * @throws IOException for low-level read issues, or * {@link JsonParseException} for decoding problems */ - protected JsonToken _parsePosNumber(int c) throws IOException + protected JsonToken _parseUnsignedNumber(int c) throws IOException { char[] outBuf = _textBuffer.emptyAndGetCurrentSegment(); int outPtr; diff --git a/src/main/java/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java b/src/main/java/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java index ad53279218..72776e1364 100644 --- a/src/main/java/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java +++ b/src/main/java/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java @@ -833,7 +833,7 @@ public JsonToken nextToken() throws IOException case '7': case '8': case '9': - t = _parsePosNumber(i); + t = _parseUnsignedNumber(i); break; case 'f': _matchFalse(); @@ -902,7 +902,7 @@ private final JsonToken _nextTokenNotInObject(int i) throws IOException case '7': case '8': case '9': - return (_currToken = _parsePosNumber(i)); + return (_currToken = _parseUnsignedNumber(i)); } return (_currToken = _handleUnexpectedValue(i)); } @@ -1113,7 +1113,7 @@ public String nextFieldName() throws IOException case '7': case '8': case '9': - t = _parsePosNumber(i); + t = _parseUnsignedNumber(i); break; case 'f': _matchFalse(); @@ -1241,7 +1241,7 @@ private final void _isNextTokenNameYes(int i) throws IOException case '7': case '8': case '9': - _nextToken = _parsePosNumber(i); + _nextToken = _parseUnsignedNumber(i); return; } _nextToken = _handleUnexpectedValue(i); @@ -1308,7 +1308,7 @@ private final boolean _isNextTokenNameMaybe(int i, SerializableString str) throw case '7': case '8': case '9': - t = _parsePosNumber(i); + t = _parseUnsignedNumber(i); break; default: t = _handleUnexpectedValue(i); @@ -1473,7 +1473,7 @@ protected final JsonToken _parseFloatThatStartsWithPeriod(final boolean neg, * @throws IOException for low-level read issues, or * {@link JsonParseException} for decoding problems */ - protected JsonToken _parsePosNumber(int c) throws IOException + protected JsonToken _parseUnsignedNumber(int c) throws IOException { char[] outBuf = _textBuffer.emptyAndGetCurrentSegment(); // One special case: if first char is 0, must not be followed by a digit