On Fri, 26 Jul 2024 14:20:07 GMT, Shaojin Wen <d...@openjdk.org> 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

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20353#discussion_r1693253379

Reply via email to