File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/main/java/org/scijava/ui/swing/script Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -172,14 +172,18 @@ 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
180179 public synchronized Node getChildAt (final int index ) {
181180 if (0 == getChildCount ()) return null ;
182- return (Node ) super .getChildAt (index );
181+ try {
182+ return (Node ) super .getChildAt (index );
183+ } catch (ArrayIndexOutOfBoundsException ae ) {
184+ System .out .println ("FileSystemTree: no child at index " + index + " for file at " + this .path );
185+ return null ;
186+ }
183187 }
184188
185189 public Icon getIcon () {
You can’t perform that action at this time.
0 commit comments