JavaWebStack / JavaWebStack/abstract-data
Numbers are not correctly detected resulting in a NumberFormatException
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 1
- Fork
- 1
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Parti da AbstractElement.fromJson("--") e segui il percorso di rilevamento e analisi numerica. Riproduci il problema su Java 8, quindi verifica che una sintassi numerica non valida fallisca immediatamente con l’eccezione corretta della libreria, invece di NumberFormatException.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- data
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100