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

Alexey Ivanov aivanov at openjdk.org
Tue Jan 7 22:02:40 UTC 2025


On Fri, 1 Nov 2024 14:02:52 GMT, Andrey Turbanov <aturbanov 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.

Looks good to me.

All the client tests are green.

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?

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

Marked as reviewed by aivanov (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21831#pullrequestreview-2535453539
PR Review Comment: https://git.openjdk.org/jdk/pull/21831#discussion_r1906090574


More information about the client-libs-dev mailing list