@Test public void parseCommandLineArguments_invalidOption() { try { LinkageCheckerArguments.readCommandLine("-x"); Assert.fail(); } catch (ParseException ex) { Assert.assertEquals("Unrecognized option: -x", ex.getMessage()); } }
static LinkageCheckerArguments readCommandLine(String... arguments) throws ParseException { CommandLineParser parser = new DefaultParser(); try { CommandLine commandLine = parser.parse(options, arguments); return new LinkageCheckerArguments(commandLine); } catch (IllegalArgumentException ex) { throw new ParseException("Invalid URL syntax in Maven repository URL" + ex.getMessage()); } }
LinkageCheckerArguments { static LinkageCheckerArguments readCommandLine(String... arguments) throws ParseException { CommandLineParser parser = new DefaultParser(); try { CommandLine commandLine = parser.parse(options, arguments); return new LinkageCheckerArguments(commandLine); } catch (IllegalArgumentException ex) { throw new ParseException("Invalid URL syntax in Maven repository URL" + ex.getMessage()); } } }
LinkageCheckerArguments { static LinkageCheckerArguments readCommandLine(String... arguments) throws ParseException { CommandLineParser parser = new DefaultParser(); try { CommandLine commandLine = parser.parse(options, arguments); return new LinkageCheckerArguments(commandLine); } catch (IllegalArgumentException ex) { throw new ParseException("Invalid URL syntax in Maven repository URL" + ex.getMessage()); } } private  LinkageCheckerArguments(CommandLine commandLine); }
LinkageCheckerArguments { static LinkageCheckerArguments readCommandLine(String... arguments) throws ParseException { CommandLineParser parser = new DefaultParser(); try { CommandLine commandLine = parser.parse(options, arguments); return new LinkageCheckerArguments(commandLine); } catch (IllegalArgumentException ex) { throw new ParseException("Invalid URL syntax in Maven repository URL" + ex.getMessage()); } } private  LinkageCheckerArguments(CommandLine commandLine);  }
LinkageCheckerArguments { static LinkageCheckerArguments readCommandLine(String... arguments) throws ParseException { CommandLineParser parser = new DefaultParser(); try { CommandLine commandLine = parser.parse(options, arguments); return new LinkageCheckerArguments(commandLine); } catch (IllegalArgumentException ex) { throw new ParseException("Invalid URL syntax in Maven repository URL" + ex.getMessage()); } } private  LinkageCheckerArguments(CommandLine commandLine);   }