RFR: 8314169: Combine related RoundingMode logic in j.text.DigitList [v3]
Justin Lu
jlu at openjdk.org
Tue Aug 15 16:38:42 UTC 2023
> Please review this PR which is a broad clean up of the DigitList class (used by Format classes in j.text).
>
> This PR is intended to be a portion of a bigger change (split up to make reviewing easier).
>
> The main change simplifying related Rounding Mode logic in `shouldRoundUp()` - (_CEILING/FLOOR_, _HALF_UP/DOWN/EVEN_)
>
> Other changes include
> - Certain for loops can be replaced with cleaner syntax (E.g. for(;;), empty for loops)
> - Introduce `roundInt(int)` - For use by Integer representations of DigitList
> - Introduce `nonZeroAfterIndex(int)` - To reduce code duplication
Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
Reflect review comment: uncombine CEILING/FLOOR (8/15/23)
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/15252/files
- new: https://git.openjdk.org/jdk/pull/15252/files/c9782b77..dc9dcf33
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=15252&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=15252&range=01-02
Stats: 9 lines in 1 file changed: 1 ins; 7 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/15252.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15252/head:pull/15252
PR: https://git.openjdk.org/jdk/pull/15252
More information about the core-libs-dev
mailing list