AbsaOSS / AbsaOSS/enceladus

Number parsing is not very strict in some cases

未关闭
#1,024 0 条评论 0 个 reaction 已指派 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 摘要。