<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
Tue Mar 16 12:25:36 UTC 2021


On Tue, 16 Mar 2021 04:24:14 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> 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 means 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.
>
> `@implnote` added

It feels wrong with this `@implNote`.

Subclasses *must still override* the default implementation. Should this statement be included in the regular spec text as it was before? Implementation note could say, “The default implementation doesn't do anything.”

Or alternatively, this change can be rejected at all, leaving the spec as it is now.

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

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


More information about the swing-dev mailing list