@@ -375,44 +375,6 @@ public static void main(String[] argv) {
375
375
}
376
376
}
377
377
378
- /**
379
- * Web address consisting of webappURI and port of a web address.
380
- */
381
- public static class WebAddress {
382
- private String host ;
383
- private int port ;
384
-
385
- WebAddress (String host , String port ) throws NumberFormatException {
386
- this .host = host ;
387
- this .port = Integer .parseInt (port );
388
- }
389
- public String getHost () {
390
- return host ;
391
- }
392
- public int getPort () {
393
- return port ;
394
- }
395
- }
396
-
397
- /**
398
- * Parse a web address into its webappURI and port components
399
- * This method along with the WebAddress class is used by OptionParser
400
- * to validate user entry of a web address.
401
- * @param webAddr expected to be in the form webappURI:port
402
- * @return WebAddress object
403
- * @throws NumberFormatException or IllegalArgumentException
404
- */
405
- public static WebAddress parseWebAddress (String webAddr ) {
406
- String [] hp = webAddr .split (":" );
407
-
408
- if (hp .length != 2 ) {
409
- throw new IllegalArgumentException ("WebAddress syntax error (expecting webappURI:port)" );
410
- }
411
-
412
- return new WebAddress (hp [0 ], hp [1 ]);
413
- }
414
-
415
-
416
378
/**
417
379
* Parse OpenGrok Indexer options
418
380
* This method was created so that it would be easier to write unit
@@ -453,9 +415,6 @@ public static String[] parseOptions(String[] argv) throws ParseException {
453
415
});
454
416
});
455
417
456
- // An example of how to add a data type for option parsing
457
- OptionParser .accept (WebAddress .class , Indexer ::parseWebAddress );
458
-
459
418
// Limit usage lines to 72 characters for concise formatting.
460
419
461
420
optParser = OptionParser .Do (parser -> {
0 commit comments