AbsaOSS / AbsaOSS/enceladus

Number parsing is not very strict in some cases

オープン
#1,024 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug priority: undecided Standardization
主要言語
Scala
スター
33
フォーク
16
PR マージ指標
30日以内にマージされた PR はありません

説明

## 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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。