Integrated: 8266578: Disambiguate BigDecimal description of scale
Ignasi Marimon-Clos
github.com+762126+ignasi35 at openjdk.java.net
Mon Jul 12 16:57:55 UTC 2021
On Fri, 9 Oct 2020 16:14:59 GMT, Ignasi Marimon-Clos <github.com+762126+ignasi35 at openjdk.org> wrote:
> The API Docs for `BigDecimal` introduce the meaning of `scale`. The current writeup can be missleading when presenting the meaning of a `scale` value that's negative. Hopefully, with this PR, the sentence is more clear.
>
> The ambiguity is on this sentence:
>
>> If negative, the unscaled value of the number is ...
>
> Instead, I suggest the more verbose:
>
>> If the scale is negative, the unscaled value of the number is ...
>
> To keep symmetry, I've also reviewed the positive case from:
>
>> If zero or positive, the scale is the number of digits ...
>
> to:
>
>> If the scale is zero or positive, the scale is the number of digits ...
This pull request has now been integrated.
Changeset: 1aef372e
Author: Ignasi Marimon-Clos <ignasi35 at gmail.com>
Committer: Brian Burkhalter <bpb at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/1aef372ed89a48f4eac0ac03b2b3520348713efb
Stats: 6 lines in 1 file changed: 1 ins; 0 del; 5 mod
8266578: Disambiguate BigDecimal description of scale
Reviewed-by: darcy, bpb
-------------
PR: https://git.openjdk.java.net/jdk/pull/582
More information about the core-libs-dev
mailing list