<Swing Dev> RFR: 8263472: Specification of JComponent::updateUI doesn't mention that the original implementaiton does nothing
Alexey Ivanov
aivanov at openjdk.java.net
Fri Mar 12 21:40:09 UTC 2021
On Fri, 12 Mar 2021 04:33:43 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> It's unclear from the spec that the original implementation of the method JComponent.updateUI() does nothing which needs to be explicitly stated in the javadoc.
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 default implementation of this method don't do anything,
Suggestion:
* Since the default implementation of this method doesn't do anything,
Or maybe even:
Suggestion:
* The default implementation of this method does nothing;
It's a statement. Then it continues with “…subclasses must override this method…”.
src/java.desktop/share/classes/javax/swing/JComponent.java line 659:
> 657:
> 658: /**
> 659: * Resets the UI property to a value from the current look and feel.
Shall it rather use plural?
Suggestion:
* Resets the UI properties to values from the current look and feel.
There are usually several properties that get updated, *all the properties* in fact.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2955
More information about the swing-dev
mailing list