<i18n dev> RFR: 8337279: Optimize format instant [v13]

Roger Riggs rriggs at openjdk.org
Thu Jan 30 15:02:00 UTC 2025


On Thu, 30 Jan 2025 14:20:36 GMT, Shaojin Wen <swen at openjdk.org> wrote:

>> By removing the redundant code logic in DateTimeFormatterBuilder$InstantPrinterParser#formatTo, the codeSize can be reduced and the performance can be improved.
>
> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   remove unused import

src/java.base/share/classes/java/time/LocalDateTime.java line 74:

> 72: import static java.time.LocalTime.SECONDS_PER_DAY;
> 73: import static java.time.temporal.ChronoField.NANO_OF_SECOND;
> 74: import static jdk.internal.util.DateTimeHelper.formatTo;

Do not import static across package boundaries. I discourage it even within the same package.
It makes the code hard to read and follow where the function is coming from.

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

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


More information about the i18n-dev mailing list