-
Bug
-
Resolution: Duplicate
-
P4
-
7
-
x86
-
windows_7
FULL PRODUCT VERSION :
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
By documentation of Java 7 returned value of JTree.getSelectionPaths() should be null if nothing selected. See
http://download.oracle.com/javase/7/docs/api/javax/swing/JTree.html#getSelectionPaths()
" Returns:
an array of TreePath objects indicating the selected nodes, or null if nothing is currently selected."
getSelectionPaths() of the default JTree selection model return empty array of TreePath
In the oldest versions of the Java it was return null. Previous versions of our product dont working with Java 7.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create JTree.
2. In the code call getSelectionPaths() when nothing selected in the tree.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
getSelectionPath should return null
ACTUAL -
gSelectionPath return empty array of TreePath
REPRODUCIBILITY :
This bug can be reproduced always.
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
By documentation of Java 7 returned value of JTree.getSelectionPaths() should be null if nothing selected. See
http://download.oracle.com/javase/7/docs/api/javax/swing/JTree.html#getSelectionPaths()
" Returns:
an array of TreePath objects indicating the selected nodes, or null if nothing is currently selected."
getSelectionPaths() of the default JTree selection model return empty array of TreePath
In the oldest versions of the Java it was return null. Previous versions of our product dont working with Java 7.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create JTree.
2. In the code call getSelectionPaths() when nothing selected in the tree.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
getSelectionPath should return null
ACTUAL -
gSelectionPath return empty array of TreePath
REPRODUCIBILITY :
This bug can be reproduced always.
- duplicates
-
JDK-7080203 JTree.getSelectionPaths() now returns empty array instead of null
-
- Closed
-