[ http://issues.apache.org/jira/browse/CLI-36?page=all ]
Henri Yandell updated CLI-36: ----------------------------- Version: (was: 1.0 Beta 2) > Option.hasArgName() has a bug > ----------------------------- > > Key: CLI-36 > URL: http://issues.apache.org/jira/browse/CLI-36 > Project: Commons CLI > Type: Bug > Environment: Operating System: other > Platform: Other > Reporter: shivaken > > I noticed a bug. > NullPointerException is occured, with helpFormatter.printHelp() > > This is a patch. > > --- Option.java.orig 2002-10-18 18:27:53.000000000 +0900 > +++ Option.java 2002-10-19 16:48:35.000000000 +0900 > @@ -395,7 +395,7 @@ > * set. > */ > public boolean hasArgName() { > - return (this.argName != null || this.argName.length() > 0 ); > + return (this.argName != null && this.argName.length() > 0 ); > } > > /** > > Or just > return (this.argName != null); > ?? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]