On Sun, 27 Apr 2025 21:04:34 GMT, Andrey Turbanov <aturba...@openjdk.org> wrote:

> `devices` contains only non-null values. It means instead of separate 
> `containsKey` call we can just call `HashMap.get` and then compare result 
> with `null`.

Myself, I like the existing code because
- it is one succinct line
- it is more readable (subjective)
- there is nothing wrong with it
- performance is not a concern for this code, and any improvement will be 
miniscule

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

PR Review: https://git.openjdk.org/jdk/pull/24907#pullrequestreview-2879741097

Reply via email to