RFR: 8346036: Unnecessary Hashtable usage in javax.swing.text.html.parser.Entity

ExE Boss duke at openjdk.org
Thu Jan 9 12:50:52 UTC 2025


On Tue, 7 Jan 2025 21:59:37 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> The Hashtable `javax.swing.text.html.parser.Entity#entityTypes` is modified only within `<clinit>` block.
>> We can replace it with immutable map to avoid Hashtable synchronization overhead.
>> Similar to what we did in #21825.
>
> src/java.desktop/share/classes/javax/swing/text/html/parser/Entity.java line 2:
> 
>> 1: /*
>> 2:  * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
> 
> Needs to be updated to 2025?

Leaving this as‑is is probably fine given that this PR hasn’t changed since then, just like https://github.com/openjdk/jdk/pull/22854#pullrequestreview-2528134788 (commit https://github.com/openjdk/jdk/commit/9a60f4457bb56d0f5039a97e6b943e62a8a2c3ee)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21831#discussion_r1908730629


More information about the client-libs-dev mailing list