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

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Wed Aug 18 04:22:23 UTC 2021


On Mon, 16 Aug 2021 21:10:10 GMT, Phil Race <prr at openjdk.org> wrote:

>>> We should either prevent null being set or catch all those nulls.
>> 
>> I did that in 1st iteration of this PR..https://github.com/openjdk/jdk/pull/4989/files/2a2ab50ded3305f3a9e0f01e90417b484a0b2db4 
>> 
>> @prrace Should I bring that fix back?
>> 
>>> Just add advisory doc on the protected field too.
>> 
>>> ok, this is part of what this change do, probably the text should be rephrased there?
>> What should be the advisory phrase? Will the text I have added in the protected field doc not suffice?
>
>> > We should either prevent null being set or catch all those nulls.
>> 
>> I did that in 1st iteration of this PR..https://github.com/openjdk/jdk/pull/4989/files/2a2ab50ded3305f3a9e0f01e90417b484a0b2db4
>> 
>> @prrace Should I bring that fix back?
>> 
> 
> You are reading my "there are two options text" and the code you propose to bring back is NOT the option
> I recommended.
> 
>> > Just add advisory doc on the protected field too.
>> 
>> > ok, this is part of what this change do, probably the text should be rephrased there?
>> > What should be the advisory phrase? Will the text I have added in the protected field doc not suffice?
> 
> Something like "subclassers must ensure this is set to a non-null value during construction and not set this to null"

@prrace Any comment on this? I am just preventing "null being set" as was recommended.

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

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


More information about the swing-dev mailing list