-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
No code change - doc only
-
Java API
-
SE
Summary
The javadoc description for javax.swing.plaf.TreeUI.getPathBounds() and javax.swing.plaf.basic.BasicTreeUI.getPathBounds() is misleading as it cites invalid conditions as valid
Problem
The javadoc descriptions for javax.swing.plaf.TreeUI.getPathBounds()
and javax.swing.plaf.basic.BasicTreeUI.getPathBounds()
stated the methods return null if any component in path is currently "valid".
Solution
The getPathBounds()
in BasicTreeUI
returns null if tree
or treeState
is null, so it should read "if any component in path is currently invalid"
Specification
src/java.desktop/share/classes/javax/swing/plaf/TreeUI.java
/**
* Returns the Rectangle enclosing the label portion that the
* last item in path will be drawn into. Will return null if
- * any component in path is currently valid.
+ * any component in path is currently invalid.
public abstract Rectangle getPathBounds(JTree tree, TreePath path);
src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java
/**
* Returns the Rectangle enclosing the label portion that the
* last item in path will be drawn into. Will return null if
- * any component in path is currently valid.
+ * any component in path is currently invalid.
*/
public Rectangle getPathBounds(JTree tree, TreePath path) {
- csr of
-
JDK-8047749 javadoc for getPathBounds() in TreeUI and BasicTreeUI is incorrect
- Resolved