Skip to content

Commit 3f2dd65

Browse files
conor-wardcowtowncoder
authored andcommitted
Issue 146: Underscores in numbers
1 parent a99ff52 commit 3f2dd65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/YAMLParser.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -743,12 +743,12 @@ protected void _parseNumericValue(int expType) throws IOException
743743
{
744744
// Int or float?
745745
if (_currToken == JsonToken.VALUE_NUMBER_INT) {
746-
int len = _textValue.length();
746+
int len = _cleanedTextValue.length();
747747
if (_numberNegative) {
748748
len--;
749749
}
750750
if (len <= 9) { // definitely fits in int
751-
_numberInt = Integer.parseInt(_textValue);
751+
_numberInt = Integer.parseInt(_cleanedTextValue);
752752
_numTypesValid = NR_INT;
753753
return;
754754
}

0 commit comments

Comments
 (0)