@Override public void close() throws IOException { super.close(); _symbols.release(); }
if (!loadMore()) { _reportInvalidEOFInValue(); if (ch == 'N') { String match = negative ? "-INF" :"+INF"; if (_matchToken(match, 3)) { if (isEnabled(Feature.ALLOW_NON_NUMERIC_NUMBERS)) { return resetAsNaN(match, negative ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY); _reportError("Non-standard token '"+match+"': enable JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS to allow"); if (_matchToken(match, 3)) { if (isEnabled(Feature.ALLOW_NON_NUMERIC_NUMBERS)) { return resetAsNaN(match, negative ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY); _reportError("Non-standard token '"+match+"': enable JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS to allow"); reportUnexpectedNumberChar(ch, "expected digit (0-9) to follow minus sign, for valid numeric value"); return null;
if (_inputPtr >= _inputEnd && !loadMore()) { return '0'; return '0'; if (!isEnabled(Feature.ALLOW_NUMERIC_LEADING_ZEROS)) { reportInvalidNumber("Leading zeroes not allowed"); while (_inputPtr < _inputEnd || loadMore()) { ch = _inputBuffer[_inputPtr]; if (ch < '0' || ch > '9') { // followed by non-number; retain one zero
if (_inputPtr >= _inputEnd && !loadMore()) { reportInvalidNumber("Leading zeroes not allowed"); reportInvalidNumber("Missing integer part (next char "+_getCharDesc(c)+")"); if (_inputPtr >= _inputEnd && !loadMore()) { eof = true; break fract_loop; reportUnexpectedNumberChar(c, "Decimal point not followed by a digit"); : getNextChar("expected a digit for number exponent"); : getNextChar("expected a digit for number exponent"); if (_inputPtr >= _inputEnd && !loadMore()) { eof = true; break exp_loop; reportUnexpectedNumberChar(c, "Exponent indicator not followed by a digit"); return reset(negative, intLen, fractLen, expLen);
reportUnexpectedNumberChar(ch, "expected digit (0-9) to follow minus sign, for valid numeric value"); reportInvalidNumber("Leading zeroes not allowed"); reportUnexpectedNumberChar(ch, "Decimal point not followed by a digit"); reportUnexpectedNumberChar(ch, "Exponent indicator not followed by a digit"); int len = ptr-startPtr; _textBuffer.resetWithShared(_inputBuffer, startPtr, len); return reset(negative, intLen, fractLen, expLen); } while (false); return parseNumberText2(negative);
return _handleInvalidNumberStart(ch, true); reportUnexpectedNumberChar(ch, "Decimal point not followed by a digit"); reportUnexpectedNumberChar(ch, "Exponent indicator not followed by a digit"); int len = ptr-startPtr; _textBuffer.resetWithShared(_inputBuffer, startPtr, len); return reset(negative, intLen, fractLen, expLen); } while (false); return parseNumberText2(negative);
char c = (_inputPtr < _inputEnd) ? _inputBuffer[_inputPtr++] : getNextChar("No digit following minus sign"); if (c == '0') { c = _verifyNoLeadingZeroes(); if (_inputPtr >= _inputEnd && !loadMore()) { reportInvalidNumber("Missing integer part (next char "+_getCharDesc(c)+")"); if (_inputPtr >= _inputEnd && !loadMore()) { eof = true; break fract_loop; reportUnexpectedNumberChar(c, "Decimal point not followed by a digit"); : getNextChar("expected a digit for number exponent"); : getNextChar("expected a digit for number exponent"); if (_inputPtr >= _inputEnd && !loadMore()) { eof = true; break exp_loop; reportUnexpectedNumberChar(c, "Exponent indicator not followed by a digit"); return reset(negative, intLen, fractLen, expLen);
@Override public void close() throws IOException { super.close(); _symbols.release(); }