jcommander icon indicating copy to clipboard operation
jcommander copied to clipboard

IStringConverter must NOT be Inner Class

Open phreed opened this issue 4 years ago • 1 comments

This could be corrected with a change to the documentation.

The problem is that the parameter types for an inner class includes the parent class. https://github.com/cbeust/jcommander/blob/master/src/main/java/com/beust/jcommander/JCommander.java#L1355 This means that the 'ctor' is not set and null is returned for inner class Converters.

phreed avatar Jun 05 '20 00:06 phreed

It can be an inner class, you just have to declare it as static class

hongwingl avatar Dec 17 '21 01:12 hongwingl