@@ -342,34 +342,30 @@ public Base(String[] args) throws Exception {
342342 }
343343 if (args [i ].equals ("--board" )) {
344344 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 ];
349348 continue ;
350349 }
351350 if (args [i ].equals ("--port" )) {
352351 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 ];
357355 continue ;
358356 }
359357 if (args [i ].equals ("--curdir" )) {
360358 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 ];
365362 continue ;
366363 }
367364 if (args [i ].equals ("--pref" )) {
368365 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 ]);
373369 continue ;
374370 }
375371 if (args [i ].startsWith ("--" ))
@@ -379,7 +375,7 @@ public Base(String[] args) throws Exception {
379375 }
380376
381377 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 );
383379
384380 for (String path : filenames ) {
385381 // 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
957953 // now that we're ready, show the window
958954 // (don't do earlier, cuz we might move it based on a window being closed)
959955 if (showEditor )
960- editor .setVisible (true );
956+ editor .setVisible (true );
961957
962958// System.err.println("exiting handleOpen");
963959
0 commit comments