AbsaOSS / AbsaOSS/enceladus

Number parsing is not very strict in some cases

Aperta
#1,024 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug priority: undecided Standardization
Lingua principale
Scala
Stelle
33
Fork
16
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Describe the bug
The parsing of number in string format based on pattern is lax in some regards, mostly regarding the number of `0`s and `#`s and grouping separator placement.
This might be undesired.

## To Reproduce
1. Specify pattern for number as `0,000.0
2. It will parse _1, 000.0_, _1,1234.56_, so as _2000_

## Expected behaviour
It's to be discussed, but the more strict approach might be desired. Or based on a switch.

## Potential solution
A low hanging solution, with performance impact is to use `format` and compare it to original input. Accept input only if the input equals the formatted number.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.