Description
PosixParser doesn't stop on "--" tokens if the option preceding the token expects an argument. GnuParser is not affected by this issue.
Test case:
public void testDoubleHyphenToken() throws Exception { Options options = new Options(); options.addOption(OptionBuilder.hasArg().create('n')); options.addOption(OptionBuilder.create('m')); CommandLine cl = parser.parse(options, new String[] { "-n", "--", "-m" }); assertTrue(cl.hasOption("n")); assertFalse(cl.hasOption("m")); }