6603771: Nimbus L&F: Ctrl+F7 keybinding for Jinternal Frame throws a NPE.#11605
6603771: Nimbus L&F: Ctrl+F7 keybinding for Jinternal Frame throws a NPE.#11605prsadhuk wants to merge 4 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back psadhukhan! A progress list of the required criteria for merging this PR into |
Webrevs
|
kumarabhi006
left a comment
There was a problem hiding this comment.
Verified in SwingSet2 demo.
|
It would be good to add a test case to make sure this bug will not happen someday again. |
I tried but it seems AWT EventQueue is gobbling up the NPE and not throwing it to application which is why even though NPE is seen but test does not fail... |
|
You can install the public static void main(String[] args) throws Exception {
EventQueue.invokeAndWait(
() -> Thread.currentThread().setUncaughtExceptionHandler(
(t, e) -> System.out.println("Error?"))); |
|
Looks like there are many "Whitespace error" reported by jcheck in the test. |
|
@prsadhuk 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 196 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
|
||
| JDesktopPane desktopPane = new JDesktopPane(); | ||
|
|
||
| iFrame = new JInternalFrame("Test"); |
There was a problem hiding this comment.
| iFrame = new JInternalFrame("Test"); | |
| iFrame = new JInternalFrame("Test"); |
|
@prsadhuk This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
/integrate |
|
Going to push as commit 7465de4.
Your commit was automatically rebased without conflicts. |
In Swingset2 JInternalFrame demo, focusing on any internalframes and pressing Ctrl+F7 and then any of up/down/left/arrow key to move the internal frames results in NPE in NimbusL&F.
It is because
JComponent.processKeyBinding()callsSwingUtilities.notifyActionwhich callsBasicDesktopPaneUI.actionPerformedwhere it getsDesktop.minOnScreenInsetsproperty to get the Insets and then uses insets.top/bottom/left/right value to move the internalframe but this property is not defined for Nimbus so deferencing Insets object results in NPE.Fix is added to create a 0 insets incase some L&F do not define
Desktop.minOnScreenInsetsproperty.No regression test is added as it can be easily checked by SwingSet2 JInternalFrame demo.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11605/head:pull/11605$ git checkout pull/11605Update a local copy of the PR:
$ git checkout pull/11605$ git pull https://git.openjdk.org/jdk pull/11605/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11605View PR using the GUI difftool:
$ git pr show -t 11605Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11605.diff