Apache commons CLI: Is it possible to use more than 26 options

Viewed 18

Is it possible to use more than 26 options in Apache commons CLI? I understand that more then 26 options can be added, but when I create e.g. two options:

Option OPTION_CREATE                = Option.builder("c").build();
Option OPTION_COPY                = Option.builder("copy").build();

and I start my program with "myprogram -copy" the call cli.hasOption(OPTION_CREATE); indicates true, although the option create has not been set explicitly. I assume that this is due to the beginning with a "c". However, it happens when setting the parameter "allowPartialMatching" in the DefaultParser on or off. Am I doing something wrong or is Apache commons CLI limited limited to 26 letters in practice?

Regards

Felix

0 Answers
Related