Ghenadie Munteanu created CLI-245:
-------------------------------------

             Summary: A static method, by definition, is called on a class and 
not on an instance of that class.
                 Key: CLI-245
                 URL: https://issues.apache.org/jira/browse/CLI-245
             Project: Commons CLI
          Issue Type: Improvement
          Components: CLI-1.x
    Affects Versions: 1.2
            Reporter: Ghenadie Munteanu
            Priority: Trivial


Please check page http://commons.apache.org/proper/commons-cli/usage.html, 
"OptionBuilder" session:

Option logfile   = OptionBuilder.withArgName( "file" )
                                .hasArg()
                                .withDescription(  "use given file for log" )
                                .create( "logfile" );

Here "create" method, which is a static one is called on the "OptionBuilder" 
instance of the object. 

fix:
Usually "create" method in builder classes should not be declared static.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to