RFR: 6603771: Nimbus L&F: Ctrl+F7 keybinding for Jinternal Frame throws a NPE. [v3]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Wed Dec 14 03:21:57 UTC 2022
> 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() `calls `SwingUtilities.notifyAction` which calls `BasicDesktopPaneUI.actionPerformed` where it gets `Desktop.minOnScreenInsets` property 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.minOnScreenInsets` property.
> No regression test is added as it can be easily checked by SwingSet2 JInternalFrame demo.
Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
Fix jcheck issues
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/11605/files
- new: https://git.openjdk.org/jdk/pull/11605/files/a4927f57..8368f130
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=11605&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=11605&range=01-02
Stats: 17 lines in 1 file changed: 3 ins; 3 del; 11 mod
Patch: https://git.openjdk.org/jdk/pull/11605.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11605/head:pull/11605
PR: https://git.openjdk.org/jdk/pull/11605
More information about the client-libs-dev
mailing list