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

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Tue Aug 17 05:26:26 UTC 2021


On Tue, 17 Aug 2021 05:09:10 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Prevent null being set
>>  - Prevent null being set
>
> src/java.desktop/share/classes/javax/swing/JInternalFrame.java line 1321:
> 
>> 1319:             desktopIcon = d;
>> 1320:             firePropertyChange("desktopIcon", oldValue, d);
>> 1321:         }
> 
> Probably NPE is better in this case? Either way the specification should say something about the new behaviour.

Are you saying to throw NPE upfront here?
Regarding the specification, we are just preventing null as per recommendation..How should it be documented (that we are preventing null from being thrown later on)?

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

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


More information about the swing-dev mailing list