Skip to content

Commit f258e8e

Browse files
authored
use NumberInput to parse numbers (#334)
1 parent a8a3eb5 commit f258e8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

smile/src/main/java/com/fasterxml/jackson/dataformat/smile/SmileGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,7 @@ protected void _writeIntegralNumber(String enc, boolean neg) throws IOException
18201820
protected void _writeDecimalNumber(String enc) throws IOException
18211821
{
18221822
try {
1823-
writeNumber(new BigDecimal(enc));
1823+
writeNumber(NumberInput.parseBigDecimal(enc));
18241824
} catch (NumberFormatException e) {
18251825
throw new JsonGenerationException("Invalid String representation for Number ('"+enc
18261826
+"'); can not write using Smile format", this);

0 commit comments

Comments
 (0)