cbeust / jcommander

Command line parsing framework for Java
Apache License 2.0
1.95k stars 332 forks source link

IStringConverter must NOT be Inner Class #489

Open phreed opened 4 years ago

phreed commented 4 years ago

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.

hongwingl commented 2 years ago

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