mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-11 16:33:42 +00:00
7080203: JTree.getSelectionPaths() now returns empty array instead of null
Reviewed-by: malenkov
This commit is contained in:
parent
16b47aa177
commit
a346c5d21d
@ -1838,7 +1838,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
|
||||
* nodes, or <code>null</code> if nothing is currently selected
|
||||
*/
|
||||
public TreePath[] getSelectionPaths() {
|
||||
return getSelectionModel().getSelectionPaths();
|
||||
TreePath[] selectionPaths = getSelectionModel().getSelectionPaths();
|
||||
|
||||
return (selectionPaths != null && selectionPaths.length > 0) ? selectionPaths : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user