<i18n dev> RFR: 8369184: SimpleTimeZone equals() Returns True for Unequal Instances with Different hashCode Values [v3]
Justin Lu
jlu at openjdk.org
Wed Oct 8 17:27:15 UTC 2025
On Tue, 7 Oct 2025 20:43:20 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> Fixing the equals/hashCode contract in the SimpleTimeZone class. The current implementation includes DST rule fields in hash code computation even for zones that do not observe DST, while equals() always considers them. Also correcting the example code in the class description, where it used 20-year-old obsolete "America/Los_Angeles" rule.
>
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>
> Address review comments
src/java.base/share/classes/java/util/SimpleTimeZone.java line 112:
> 110: * <p>
> 111: * The following are examples of parameters for constructing time zone objects.
> 112: * <pre><code>
We can consider replacing `<pre><code>` with `@snippet` so that the code example can be copied by readers. Although I understand if leaving it for another time as to not invalidate the existing approvals.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27660#discussion_r2414548133
More information about the i18n-dev
mailing list