On Thu, 27 Jul 2023 06:46:46 GMT, John Jiang <jji...@openjdk.org> wrote:

> if (i < savingsInstantTransitions.length) {
>     // javazic writes the last GMT offset into index 0!
>     if (i < savingsInstantTransitions.length) {
>         offsets[0] = standardOffsets[standardOffsets.length - 1] * 1000;
>         nOffsets = 1;
>     }
>     ...
> }
> 
> 
> The second if statement looks unnecessary.

src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java line 471:

> 469:             if (i < savingsInstantTransitions.length) {
> 470:                 // javazic writes the last GMT offset into index 0!
> 471:                 if (i < savingsInstantTransitions.length) {

Even my IDE flags it as always true. While it surely is redundant, I wonder if 
some other check was intended instead. @jodastephen?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15052#discussion_r1276120009

Reply via email to