JavaWebStack / JavaWebStack/abstract-data
Numbers are not correctly detected resulting in a NumberFormatException
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at AbstractElement.fromJson("--") and trace the numeric detection and parsing path. Reproduce the failure on Java 8, then verify that invalid numeric syntax fails fast with the library's proper exception rather than NumberFormatException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100