On Thu, 30 Jan 2025 14:20:36 GMT, Shaojin Wen <s...@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

Reply via email to