@@ -375,44 +375,6 @@ public static void main(String[] argv) {
375375 }
376376 }
377377
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-
416378 /**
417379 * Parse OpenGrok Indexer options
418380 * 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 {
453415 });
454416 });
455417
456- // An example of how to add a data type for option parsing
457- OptionParser .accept (WebAddress .class , Indexer ::parseWebAddress );
458-
459418 // Limit usage lines to 72 characters for concise formatting.
460419
461420 optParser = OptionParser .Do (parser -> {
0 commit comments