Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numbers are not correctly detected resulting in a NumberFormatException #31

Open
JanHolger opened this issue Aug 30, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@JanHolger
Copy link
Member

Describe the Bug
We detected numbers based on certain characters but we don't validate that they actually match the syntax of a number. Instead of throwing a proper exception we hand the value to parseLong/parseDouble resulting in a NumberFormatException being thrown

To Reproduce
Steps to reproduce the behavior:

AbstractElement.fromJson("--")

Expected behavior
It should fail fast and throw a proper exception

Screenshots / Logs
If applicable, add screenshots and/or logs to help explain your problem. You can use pastefy.ga to upload large text snippets.

Environment Information:

  • Java Language Level 8
  • Version 1.0.6
@JanHolger JanHolger added the bug Something isn't working label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant