[jdk19] RFR: 8288854: getLocalGraphicsEnvironment() on for multi-screen setups throws exception NPE
Alexey Ivanov
aivanov at openjdk.org
Wed Jun 29 10:19:42 UTC 2022
On Mon, 27 Jun 2022 21:17:54 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> This is the fix for a copy-paste error. The fix JDK-8076313 replaced the usage of the "screens" array from the parent class to the "devices" where the list of devices is now maintained. Since "screens" array is never used nor initialized its usage caused an NPE. That check was copied as-is, while it should use the actual number of screen devices requested early in that method.
>
> The bug is rarely reproduced because in single screen configuration the main screen is usually 0, and in the multiscreen configuration Xinerama is usually active so the main screen is also 0 => the second part of the "if" statement is not executed.
>
> I have validated the fix by the SwingSet, I also executed desktop tests in that config and found that even though this particular bug is fixed we still have many issues there, around ~100 tests failed.
Marked as reviewed by aivanov (Reviewer).
-------------
PR: https://git.openjdk.org/jdk19/pull/81
More information about the client-libs-dev
mailing list