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

CmdLineException deprecated is wrong #113

Closed
cyberluke opened this issue Jun 1, 2015 · 2 comments
Closed

CmdLineException deprecated is wrong #113

cyberluke opened this issue Jun 1, 2015 · 2 comments

Comments

@cyberluke
Copy link

CmdLineException is deprecated, but instruction "Use {@link #CmdLineException(org.kohsuke.args4j.CmdLineParser, Localizable, java.lang.String...)" cannot be put to use.

Localizable interface has javadoc @see Messages

Ok, so I want to use this enum Messages:
enum Messages implements Localizable {

But this cannot be used as it can be used only inside a package (missing public keyword). Therefore there is no other option than to use deprecated CmdLineException exception.

Therefore CmdLineException should not be deprecated or Messages should be public :-)

@cyberluke
Copy link
Author

Ok, works in 2.0.29! :-) Closing this issue.

public enum Messages implements Localizable

@charlesritchea
Copy link

@kohsuke This seems to be broken again. Messages is no longer public. What is the recommended way to create a simple CmdLineException with a message? The only obvious way right now is to create some throwaway Exception and pass it in to new CmdLineException("my message", ex). Is this really the intention?

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

2 participants