deprecated CmdLineException ctor says to use another deprecated ctor
charlesritchea opened this issue · 0 comments
charlesritchea commented
Creating a CmdLineException with just a string has been deprecated,
but the deprecation message says to use another ctor that is also deprecated
/**
* @deprecated
* Use {@link #CmdLineException(CmdLineParser, String)}
*/
public CmdLineException(String message) {
super(message);
}
I really wish this were not deprecated in the first place:
/**
* @deprecated
* Use {@link #CmdLineException(org.kohsuke.args4j.CmdLineParser, Localizable, java.lang.String...) }
*/
public CmdLineException(CmdLineParser parser, String message) {
super(message);
this.parser = parser;
}
This ctor, which is the only non-deprecated ctor that doesn't require a Throwable, would be great if it weren't for Messages being package-private. If Messages were public, this would be convenient.
/**
* @author Kohsuke Kawaguchi
*/
enum Messages implements Localizable {