-
CSR
-
Resolution: Approved
-
P3
-
None
-
behavioral
-
minimal
-
No behavior change - specification only so minimal risk
-
Java API
-
SE
Summary
It's unclear from the spec that the original implementation of the method does nothing in https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/swing/JComponent.html#updateUI()
Problem
The current state of specification for https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/swing/JComponent.html#updateUI() is unclear that the original implementation of the method does nothing. This deserves to be mentioned explicitly.
Solution
javadoc updated to mention that the base method does not do anything via @implSpec tag.
Specification
/**
- * Resets the UI property to a value from the current look and feel.
- * <code>JComponent</code> subclasses must override this method
+ * This method is called to update the UI property to a value from the
+ * current look and feel.
+ * {@code JComponent} subclasses must override this method
* like this:
* <pre>
* public void updateUI() {
* setUI((SliderUI)UIManager.getUI(this);
* }
* </pre>
*
+ * @implSpec The default implementation of this method does nothing.
+ *
* @see #setUI
* @see UIManager#getLookAndFeel
* @see UIManager#getUI
*/
public void updateUI() {}
- csr of
-
JDK-8263472 Specification of JComponent::updateUI should document that the default implementation does nothing
-
- Resolved
-