args4j
args4j copied to clipboard
added functionality to ignore undefined options
hi @kohsuke, I added a small bit of functionality to CmdLineParser
that allows to ignore undefined options, rather than throwing a CmdLineException
. This behaviour can be controlled through the boolean switch org.kohsuke.args4j.ParserProperties#ignoreUndefinedOptions
. This is switched off by default. Currently it only works for fields annotated with @Option
and not with @Argument
fields.
I added two unit tests.
If you would take this pull request into consideration, I'd be very grateful. Please let me know if any changes are required.