[ https://issues.apache.org/jira/browse/CLI-304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17070935#comment-17070935 ]
Gary D. Gregory commented on CLI-304: ------------------------------------- [~HuM4NoiD], Thank your suggestion. This kind of change is not binary compatible so would have to wait for 2.0. > Eliminating message Constructors in Exceptions to avoid misuse > -------------------------------------------------------------- > > Key: CLI-304 > URL: https://issues.apache.org/jira/browse/CLI-304 > Project: Commons CLI > Issue Type: Bug > Components: CLI-1.x > Affects Versions: 1.4 > Reporter: Jugal Mistry > Priority: Minor > > Please Consider marking the constructors from Exceptions that follow the > format: > {{public FooException(final String message) \{ super(message) }}} > as private or removing them altogether from the Following classes: > {{AlreadySelectedException}} > MissingArgumentException > MissingOptionException > UnrecognisedOptionException > As they are only used within respective class and do not initialize the > member fields. If a library uses the above constructors, then projects that > depend on the library will get null values for members if the exceptions are > caught, which should be avoided -- This message was sent by Atlassian Jira (v8.3.4#803005)