<Swing Dev> [11] Review Request: JDK-5076761 : JList.setSelectedValue(null, ...) doesn't do anything
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Wed Jan 17 16:53:29 UTC 2018
On 17/01/2018 08:41, Semyon Sadetsky wrote:
>> I already listed a methods which use null as an absent of the value.
>> And current methods were implemented with this intention.
> But JList is fully usable without them.
No because getSelectedValue() will return null if no elements is selected.
>>
>>> as well as any pointer that JList couldn't contain null.
>>
>> There are no references to null in the javadoc which means that null
>> is unsupported. By default the null value is unsupported, and it can
>> be considered as supported only if spec accept that.
> That is a good argument that proves that null is not considered as a
> special value.
What argument? There are no description that null is supported, but
there are a description that null is used in somecases like
getSelectedValue().
--
Best regards, Sergey.
More information about the swing-dev
mailing list