RFR: 8295323: Unnecessary HashTable usage in StyleSheet
Alexey Ivanov
aivanov at openjdk.org
Mon Oct 24 15:49:55 UTC 2022
On Sat, 1 Oct 2022 16:53:17 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> Hashtable was used only from single thread. And only non-null key/values added to it. We can safely replace it with HashSet.
src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java line 1424:
> 1422: @SuppressWarnings("unchecked")
> 1423: Vector<SelectorMapping> tempVector = sb.getVector();
> 1424: HashSet<SelectorMapping> tempHashSet = sb.getHashSet();
Rename variable to `alreadyChecked`?
-------------
PR: https://git.openjdk.org/jdk/pull/10522
More information about the client-libs-dev
mailing list