On Wed, 30 Apr 2025 03:26:01 GMT, Sergey Bylokhov <s...@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`.
>
> src/java.desktop/unix/classes/sun/awt/X11GraphicsEnvironment.java line 236:
> 
>> 234:         for (int id = 0; id < numScreens; ++id) {
>> 235:             X11GraphicsDevice d = old.remove(id);
>> 236:             devices.put(id, d != null ? d : new X11GraphicsDevice(id));
> 
> same can be done in CGraphicsEnvironment.java

Do you suggest to update it in this PR? Or file a separate issue?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24907#discussion_r2074196187

Reply via email to