<i18n dev> RFR: 8276220: Reduce excessive allocations in DateTimeFormatter [v3]

Claes Redestad redestad at openjdk.java.net
Wed Nov 3 12:20:11 UTC 2021


On Wed, 3 Nov 2021 12:04:10 GMT, Stephen Colebourne <scolebourne at openjdk.org> wrote:

>> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add fallback for values outside the allowable range
>
> src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 3544:
> 
>> 3542:             BigDecimal valueBD = BigDecimal.valueOf(value).subtract(minBD);
>> 3543:             BigDecimal fraction = valueBD.divide(rangeBD, 9, RoundingMode.FLOOR);
>> 3544:             // stripTrailingZeros bug
> 
> I believe this bug was fixed a while back, so this code could be simplified.

Got a reference to which bug this was and how it manifests?

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

PR: https://git.openjdk.java.net/jdk/pull/6188


More information about the i18n-dev mailing list