Cannot use negative number in search query

Issue #14 resolved
Former user created an issue

When I try to filter using query like:

http://localhost:8080/weather/search?weather.temperature=gt(-3)

I get IllegalArgumentException: Invalid numeric value

Every time I use negative number I get such exception

Sample solution could be:

In NumberPathExpressionProviderImpl class use (instead of StringUtils.isNumeric) NumberUtils.isCreatable or NumberUtils.isParsable

BTW Great library - keep on doing such nice thing!

Comments (4)

  1. GT Tech repo owner

    Thanks for reporting the issue, it is fixed with this commit. The version 5.0.0-SNAPSHOT version contains the fix (please refer to read me to use snapshot repository). The next release version isn't currently planned due to lack of new changes but I will release a hot fix release version for this in a week or so.

  2. Sven Döring

    Did you release a hot fixed version? This bug is bothering me, too, on floating point numbers.

    Can’t use Snapshots as they are forbidden in our Nexus.

  3. Log in to comment