File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
TimeNETOptimizationEnvironment/src/toe/optimization Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1345,19 +1345,21 @@ public int getNumberOfOptiPrefs() {
13451345
13461346 File [] listOfFiles = folderToScan .listFiles ();
13471347
1348- for (int i = 0 ; i < listOfFiles .length ; i ++) {
1349- if (listOfFiles [i ].isFile ()) {
1350- target_file = listOfFiles [i ].getName ();
1351- if (target_file .startsWith (standardFile .getName ())) {
1352- numberOfFoundOptiPrefs ++;
1348+ if (listOfFiles != null ) {
1349+ for (int i = 0 ; i < listOfFiles .length ; i ++) {
1350+ if (listOfFiles [i ].isFile ()) {
1351+ target_file = listOfFiles [i ].getName ();
1352+ if (target_file .startsWith (standardFile .getName ())) {
1353+ numberOfFoundOptiPrefs ++;
1354+ }
13531355 }
13541356 }
13551357 }
13561358 return numberOfFoundOptiPrefs ;
13571359 }
13581360
13591361 /**
1360- * Updates the label to shwo how many Optipreferences are stored in
1362+ * Updates the label to show how many Optipreferences are stored in
13611363 * pref-folder
13621364 */
13631365 private void updateNumberOfOptiPrefs () {
You can’t perform that action at this time.
0 commit comments