<i18n dev> RFR: 8313231: Redundant if statement in ZoneInfoFile
Pavel Rappo
prappo at openjdk.org
Thu Jul 27 11:03:40 UTC 2023
On Thu, 27 Jul 2023 06:46:46 GMT, John Jiang <jjiang at 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
More information about the i18n-dev
mailing list