wrandelshofer/FastDoubleParser

The parser throws StringIndexOutOfBoundsException/ArrayIndexOutOfBoundsException for some inputs

Closed this issue · 6 comments

The parser throws StringIndexOutOfBoundsException/ArrayIndexOutOfBoundsException for some inputs.
For example with the following input: "0x".

This issue has been discovered in FasterXML/jackson-core#809

The only exceptions, that the parser may throw are:

  • NumberFormatException when the input is illegal
  • OutOfMemoryException when the JVM fails to allocate memory for objects created by the parser

Fixed in the following branches and revisions:

@wrandelshofer Do you plan a release with this fix (including a m2 central deploy?) Thanks

I haven't released a fix just for this issue, because I thought there was little interest in parsing hexadecimal floating point literals.

I am planning to make release and m2 central deploy after fixing issue #19.

@wrandelshofer thanks for all your hard work

We use your java8 code in jackson-core. If you publish a jar with your java8 branch code that would be great - we would change our build to use your published jars and that shades the class packages to include them in jackson-core jar.

One solution would be to append '-java8' to the artifact name (and '-java17' for the java17 jar). Or maven supports 'classifiers' which basically lead to a similar result.

@blacelle
I have now released and deployed version 0.5.0 of fastdoubleparser. This release contains the fix for this issue (and other improvements).
https://search.maven.org/artifact/ch.randelshofer/fastdoubleparser/0.5.0/jar

Excellent. And it has been pushed to m2central (while 0.4.0 has not been pushed). Thx a lot!