<Swing Dev> RFR: 8263472: Specification of JComponent::updateUI doesn't mention that the original implementaiton does nothing [v2]
Alexey Ivanov
aivanov at openjdk.java.net
Mon Mar 15 21:40:09 UTC 2021
On Mon, 15 Mar 2021 21:12:11 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> 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.
It hasn't changed over all these years… In addition to that, the specification says you *must* override and shows the example without calling `super.updateUI()`.
My take is it's unlikely to change. Yet I understand your concern: Stating explicitly `JComponent.updateUI` is empty, there's no way back. So being cautious wouldn't hurt. From this point of view, `@implnote` still gives some flexibility rather than being cast in stone.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2955
More information about the swing-dev
mailing list