kohsuke/args4j — pull request #4 by eller86 (2011-10-25 23:35:51+00:00)
Title: enable the EnumOptionHandler to handle illegal arguments

I think that current EnumOptionHandler cannot handle illegal values for field annotated by @Argument. It will throw an ArrayIndexOutOfBoundsException, or return incorrect messages.

The reason is `params.getParameter(-1)` in EnumOptionHandler#parseArguments(Parameters).
https://github.com/kohsuke/args4j/blob/9331ddf894b396e8f7bfefc38a87d5074cbb4260/args4j/src/org/kohsuke/args4j/spi/EnumOptionHandler.java#L32

I hope my pull request helps your product.