Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-245

A static method, by definition, is called on a class and not on an instance of that class.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Won't Fix
    • 1.2
    • None
    • CLI-1.x
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gmunteanu Ghenadie Munteanu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified