This commit is contained in:
boccioli_m
2017-10-20 15:52:03 +02:00
parent 13f8ce50e0
commit b3f69de2c0

View File

@@ -40,6 +40,7 @@ import java.lang.reflect.Method;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -2377,7 +2378,8 @@ public class TestingList extends Panel {
int iCounter = 0;
//search devices and their tests
//Scan the list of devices
File[] listOfDevices = TESTS_DEVICES_DEFAULT_DIR.toFile().listFiles();
List<File> listOfDevices = new ArrayList<File>();
Collections.addAll(listOfDevices, TESTS_DEVICES_DEFAULT_DIR.toFile().listFiles());
for (File deviceInList : listOfDevices) {
propDevice.clear();
if (deviceInList.isFile()) {
@@ -2411,9 +2413,12 @@ public class TestingList extends Panel {
}
}
}
} else { // if nothing found in this directory, see if there is a subdireactory
Collections.addAll(listOfDevices, deviceInList.listFiles());
}
}
}
}
}
//showEnabledTestsOnly(jCheckBoxMenuShowSelectedTests1.getState());
logger.log(Level.INFO, iCounter + " tests loaded.");
}