DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13780>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13780 Option.hasArgName() has a bug Summary: Option.hasArgName() has a bug Product: Commons Version: 1.0 Beta 2 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: CLI AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 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); ?? -- To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>