How to reproduce:
class App {
@Option(names = "-a", groups = "ALL") boolean a;
@Option(names = "-b", groups = "ALL") boolean b;
}
CommandLine.populate(new Args(), "-a -b"); // NOT "-a", "-b" !
Gives this cryptic error message:
UnmatchedArgumentException: Unknown option: - -b
The parser takes this as a POSIX clustered option group, matches the "-a" part, then tries and fails to match the remainder " -b" (with leading space) by prefixing with a - and going through the logic in processClusteredShortOptions again. This results in the surprising error message.
One option to improve this is to add the original option cluster in the error message.