Add minor code comments
@@ -911,6 +911,8 @@ public abstract class ParserBase extends ParserMinimalBase
*/
try {
if (expType == NR_BIGDECIMAL) {
+ // 04-Dec-2022, tatu: Let's defer actual decoding until it is certain
+ // value is actually needed.
_numberBigDecimal = null;
_numberString = _textBuffer.contentsAsString();
streamReadConstraints().validateFPLength(_numberString.length());
@@ -921,6 +923,9 @@ public abstract class ParserBase extends ParserMinimalBase
_numTypesValid = NR_FLOAT;
} else {
// Otherwise double has to do
+ // 04-Dec-2022, tatu: We can get all kinds of values here, NR_DOUBLE
+ // but also NR_INT or even NR_UNKNOWN. Shouldn't we try further
+ // deferring some typing?
_numberDouble = _textBuffer.contentsAsDouble(streamReadConstraints(),
isEnabled(Feature.USE_FAST_DOUBLE_PARSER));
_numTypesValid = NR_DOUBLE;
