Skip to content

Commit ebbf33c

Browse files
committed
Simpligy getChildCount(), to avoid calling a function (updatedChildrenFiles)
that could result in using a different list of data for listing children nodes.
1 parent d84db52 commit ebbf33c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/scijava/ui/swing/script/FileSystemTree.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ public String toString() {
172172

173173
@Override
174174
public synchronized int getChildCount() {
175-
if (isRoot()) return super.getChildCount();
176-
return new File(this.path).isDirectory() ? updatedChildrenFiles(false).length : 0;
175+
return super.getChildCount();
177176
}
178177

179178
@Override

0 commit comments

Comments
 (0)