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

Part of help is missing when running printHelpOn(...) #56

Closed
smikkelsendk opened this Issue Feb 17, 2014 · 4 comments

Comments

Projects
None yet
2 participants
@smikkelsendk

smikkelsendk commented Feb 17, 2014

I have this simple OptionParser (jopt-simple 4.6)

 OptionParser parser = new OptionParser(); 

        parser.accepts(optionPassword, "Server Password").withRequiredArg().ofType(String.class);

        parser.accepts(optionForwardMapping, "Forward port mapping (ie: localhost:5900:localhost:5900").withRequiredArg();
        parser.accepts(optionReverseMapping, "Reverse port mapping (ie: localhost:5900:localhost:5900").withRequiredArg();

Problem is that when printing the help, part of it is missing:

 
Option      Description                         
------      -----------                         
-L          Forward port mapping (ie: localhost:
              5900:localhost:5900               
-R          Reverse port mapping (ie: localhost:
--password  Server Password                     

If i change part of the absent description (ie change 5900 to 5901) it will appear:

 
Option      Description                         
------      -----------                         
-L          Forward port mapping (ie: localhost:
              5900:localhost:5900               
-R          Reverse port mapping (ie: localhost:
              5900:localhost:5901               
--password  Server Password                     

@pholser

This comment has been minimized.

Show comment
Hide comment
@pholser

pholser Feb 17, 2014

Collaborator

Wow, that's weird. Will check it out.

Collaborator

pholser commented Feb 17, 2014

Wow, that's weird. Will check it out.

@pholser

This comment has been minimized.

Show comment
Hide comment
@pholser

pholser Feb 17, 2014

Collaborator

Note to self: never use Set unless you're absolutely sure that you need unique values. 8^)

Collaborator

pholser commented Feb 17, 2014

Note to self: never use Set unless you're absolutely sure that you need unique values. 8^)

@pholser

This comment has been minimized.

Show comment
Hide comment
@pholser

pholser Feb 17, 2014

Collaborator

Latest 4.7 snapshot should have this resolved. Sorry for the trouble, but thanks for pointing out the problem!

Collaborator

pholser commented Feb 17, 2014

Latest 4.7 snapshot should have this resolved. Sorry for the trouble, but thanks for pointing out the problem!

@pholser pholser closed this Feb 17, 2014

@pholser pholser reopened this Feb 17, 2014

@smikkelsendk

This comment has been minimized.

Show comment
Hide comment
@smikkelsendk

smikkelsendk Feb 18, 2014

I just checked out the code from GitHub and tried my program again - this time it works just fine.
Thank you for the super-quick response and fix!

smikkelsendk commented Feb 18, 2014

I just checked out the code from GitHub and tried my program again - this time it works just fine.
Thank you for the super-quick response and fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment