<Swing Dev> RFR: 8263472: Specification of JComponent::updateUI doesn't mention that the original implementaiton does nothing [v2]
Sergey Bylokhov
serb at openjdk.java.net
Mon Mar 15 21:15:10 UTC 2021
On Mon, 15 Mar 2021 18:06:57 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> src/java.desktop/share/classes/javax/swing/JComponent.java line 660:
>>
>>> 658: /**
>>> 659: * Resets the UI property to a value from the current look and feel.
>>> 660: * Since the default implementation of this method doesn't do anything,
>>
>> The reason why this method should be overridden is that the subclasses only can implement it properly, and it is not because the current method is empty.
>>
>> Probably we can move the new text to the @implnote tag?
>
> Yet specifying that this method is empty implies overridden methods do not need to call `super.updateUI()`.
But probably it might be changed in the future? If for example, we will move some common functionality from the standard subclasses to this method.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2955
More information about the swing-dev
mailing list