RFR: 8314169: Combine related RoundingMode logic in j.text.DigitList [v3]

Naoto Sato naoto at openjdk.org
Tue Aug 15 17:24:08 UTC 2023


On Tue, 15 Aug 2023 16:38:42 GMT, Justin Lu <jlu at openjdk.org> wrote:

>> 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)

LGTM

-------------

Marked as reviewed by naoto (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15252#pullrequestreview-1579050154


More information about the core-libs-dev mailing list