8288854: getLocalGraphicsEnvironment() on for multi-screen setups throws exception NPE #81
Conversation
👋 Welcome back serb! A progress list of the required criteria for merging this PR into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@mrserb This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 10 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
BTW why this PR is raised against JDK19 and not mainline? |
Don't all fixes from JDK19 have merged to the mainline "automatically"? |
This is the phase when all fixes are merged to the mainline. From your links above:
Since the small fix for a recent regression is ready I do not see a reason to skip it? |
OK, thanks for clarification. |
/integrate |
Going to push as commit cfc9a88.
Your commit was automatically rebased without conflicts. |
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.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk19 pull/81/head:pull/81
$ git checkout pull/81
Update a local copy of the PR:
$ git checkout pull/81
$ git pull https://git.openjdk.org/jdk19 pull/81/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 81
View PR using the GUI difftool:
$ git pr show -t 81
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk19/pull/81.diff