RFR: 8357687: Remove unnecessary Map.containsKey from GraphicsEnvironment implementations
Andrey Turbanov
aturbanov at openjdk.org
Sat May 24 16:42:28 UTC 2025
`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`.
-------------
Commit messages:
- [PATCH] Remove unnecessary Map.containsKey from CGraphicsEnvironment.initDevices
- [PATCH] Remove unnecessary Map.containsKey from X11GraphicsEnvironment.initDevices
Changes: https://git.openjdk.org/jdk/pull/24907/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24907&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8357687
Stats: 6 lines in 2 files changed: 0 ins; 0 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/24907.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24907/head:pull/24907
PR: https://git.openjdk.org/jdk/pull/24907
More information about the client-libs-dev
mailing list