On Sat, 1 Oct 2022 16:53:17 GMT, Andrey Turbanov <[email protected]> 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 1364:

> 1362:                            HashSet<SelectorMapping> alreadyChecked) {
> 1363:         // Avoid descending the same mapping twice.
> 1364:         if (!alreadyChecked.add(parentMapping)) {

Clever!

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

PR: https://git.openjdk.org/jdk/pull/10522

Reply via email to