On Fri, 26 Jul 2024 15:24:46 GMT, Stephen Colebourne <[email protected]>
wrote:
>> By removing the redundant code logic in
>> DateTimeFormatterBuilder$InstantPrinterParser#formatTo, the codeSize can be
>> reduced and the performance can be improved.
>
> src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java
> line 3818:
>
>> 3816: }
>> 3817: // add fraction
>> 3818: if (fractionalDigits > 0) {
>
> This breaks the logic. `fractionalDigits` can be negative in the block below
If fractionalDigits < 0, printNano is implemented in LocalDateTime
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20353#discussion_r1693263366