`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