<Swing Dev> RFR: 5015261: JInternalFrame causes NPE

Sergey Bylokhov serb at openjdk.java.net
Thu Aug 5 20:11:31 UTC 2021


On Thu, 5 Aug 2021 04:59:18 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> Will just stating null icon is unsupported do? I think in that case should we throw IAE?

This icon field is protected so technically it can be changed w/o constructor and set method. So we have a choice:
1. Specify that the null icon is unsupported and may throw NPE any time after
2. Update the set method to throw NPE(since this is an exception already used by various parts) if a null value is passed.

We can do only the first one, or both.

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

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


More information about the swing-dev mailing list