@@ -342,34 +342,30 @@ public Base(String[] args) throws Exception {
342
342
}
343
343
if (args [i ].equals ("--board" )) {
344
344
i ++;
345
- if (i < args .length )
346
- selectBoard = args [i ];
347
- else
348
- showError (null , "Argument required for --board" , 3 );
345
+ if (i >= args .length )
346
+ showError (null , "Argument required for --board" , 3 );
347
+ selectBoard = args [i ];
349
348
continue ;
350
349
}
351
350
if (args [i ].equals ("--port" )) {
352
351
i ++;
353
- if (i < args .length )
354
- selectPort = args [i ];
355
- else
356
- showError (null , "Argument required for --port" , 3 );
352
+ if (i >= args .length )
353
+ showError (null , "Argument required for --port" , 3 );
354
+ selectPort = args [i ];
357
355
continue ;
358
356
}
359
357
if (args [i ].equals ("--curdir" )) {
360
358
i ++;
361
- if (i < args .length )
362
- currentDirectory = args [i ];
363
- else
364
- showError (null , "Argument required for --curdir" , 3 );
359
+ if (i >= args .length )
360
+ showError (null , "Argument required for --curdir" , 3 );
361
+ currentDirectory = args [i ];
365
362
continue ;
366
363
}
367
364
if (args [i ].equals ("--pref" )) {
368
365
i ++;
369
- if (i < args .length )
370
- processPrefArgument (args [i ]);
371
- else
372
- showError (null , "Argument required for --pref" , 3 );
366
+ if (i >= args .length )
367
+ showError (null , "Argument required for --pref" , 3 );
368
+ processPrefArgument (args [i ]);
373
369
continue ;
374
370
}
375
371
if (args [i ].startsWith ("--" ))
@@ -379,7 +375,7 @@ public Base(String[] args) throws Exception {
379
375
}
380
376
381
377
if ((doUpload || doVerify ) && filenames .size () != 1 )
382
- showError (null , _ ("Must specify exactly one sketch file" ), 3 );
378
+ showError (null , _ ("Must specify exactly one sketch file" ), 3 );
383
379
384
380
for (String path : filenames ) {
385
381
// Fix a problem with systems that use a non-ASCII languages. Paths are
@@ -957,7 +953,7 @@ protected Editor handleOpen(String path, int[] location, boolean showEditor) thr
957
953
// now that we're ready, show the window
958
954
// (don't do earlier, cuz we might move it based on a window being closed)
959
955
if (showEditor )
960
- editor .setVisible (true );
956
+ editor .setVisible (true );
961
957
962
958
// System.err.println("exiting handleOpen");
963
959
0 commit comments