Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecated CmdLineException ctor says to use another deprecated ctor #154

Open
charlesritchea opened this issue Aug 13, 2017 · 0 comments
Open

Comments

@charlesritchea
Copy link

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 {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant