commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CLI-36) Option.hasArgName() has a bug
Date Mon, 10 Jul 2006 05:39:35 GMT
     [ 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message