<Swing Dev> RFR: 5015261: JInternalFrame causes NPE
Sergey Bylokhov
serb at openjdk.java.net
Wed Aug 4 19:05:29 UTC 2021
On Wed, 4 Aug 2021 09:02:25 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> JInternalFrame.getDesktopIcon() can be null as setDesktopIcon() can be called with null value. There are many places in JInternalFrame where getDesktopIcon() is accessed without null check which might cause NPE.
> Added null check for those cases.
Does the null desktop icon is actually supported? I have set it to null in the constructor of JInternalFrame, and check how the SwingSet2 work when jdesktop frame is minimized, under all L&F I got NPE. But even if we fix that npe how the user will be able to "unmimimize" the window? Probably we should state that the null icon is unsupported?
-------------
PR: https://git.openjdk.java.net/jdk/pull/4989
More information about the swing-dev
mailing list