RFR: 8295323: Unnecessary HashTable usage in StyleSheet
SWinxy
duke at openjdk.org
Mon Oct 24 06:54:49 UTC 2022
On Mon, 24 Oct 2022 04:42:18 GMT, Phil Race <prr at openjdk.org> wrote:
>> 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!
>
> Seriously ? That is your explanation ? Do better.
Hi Phil,
I'm not sure what you mean by this. I'd like to give feedback to client-related PRs when I can, and this line stood out to me as a smart change. I don't want to be critical all the time, so when I see a change I quite like, I want to let the person who wrote it know. Here, I thought the usage of `add(parentMapping)` was clever.
-------------
PR: https://git.openjdk.org/jdk/pull/10522
More information about the client-libs-dev
mailing list