-
Notifications
You must be signed in to change notification settings - Fork 418
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
AutoComplete
fails with NPE if message bundle key for command name is used
#1352
Comments
I have added some tests to the AutoCompleteTest, but I have been unable to reproduce the NullPointerException... Can you provide an example of how to reproduce this issue, or point out what I am missing? |
Ah, I think the issue is that the bundle in question is being set in the commandLine.setResourceBundle(ResourceBundle.getBundle("messages")); Thus it probably cannot be found. I'm wondering if there is a way around this. Maybe the ability to specify a bundle file on the command line? |
Oh, I see. What is the reason you don't specify the resource bundle in the annotation of the top-level class? |
Mainly to keep things DRY, global and centralized and not have to repeat in all commands. |
Understood. |
Yep. That should work for me. Thanks for the suggestion. On a related note, what about use cases where command lines are created without annotations? Are these supported today? |
Yes, but when using the programmatic API your are building up a Instead, you would pass your dynamically created |
@bobtiernay-okta I am closing this issue; please let me know if I missed something, I can always reopen it. :-) |
…mplete" This reverts commit 44ddb83.
…mplete" This reverts commit 44ddb83.
If the following is used for a command:
AutoComplete
will fail with:Note that this happens even when specifying the
-n
parameter.Thus it would be useful to consider adding message bundle support for this and other use cases.
The text was updated successfully, but these errors were encountered: