<Swing Dev> RFR: 5015261: JInternalFrame causes NPE [v5]

Phil Race prr at openjdk.java.net
Sun Aug 22 04:15:33 UTC 2021


On Thu, 19 Aug 2021 16:48:46 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.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Throw NPE upfront in setter

Could you change the bug and CSR summary, and of course the title of this PR ?
I think JinternalFrame does not cause the NPE. It is caused by setting a null desktop icon
Something like
"NPE may be thrown if JDesktopIcon is set to null on a JInternalFrame"

-------------

PR: https://git.openjdk.java.net/jdk/pull/4989


More information about the swing-dev mailing list