commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thusitha Thilina Dayaratne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLI-245) A static method, by definition, is called on a class and not on an instance of that class.
Date Sat, 09 May 2015 15:55:00 GMT

    [ https://issues.apache.org/jira/browse/CLI-245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14536736#comment-14536736
] 

Thusitha Thilina Dayaratne commented on CLI-245:
------------------------------------------------

I've checked the source and seems that OptionBuilder is already deprecated and already got
patch which is attached with https://issues.apache.org/jira/browse/CLI-224
so is this still need to be fixed?

> 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
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.3.4#6332)

Mime
View raw message