logo       

[ checkstyle-Bugs-1762702 ] HideUtilityConstructor marks a surely non-utili: msg#00249

Subject: [ checkstyle-Bugs-1762702 ] HideUtilityConstructor marks a surely non-utility class
Bugs item #1762702, was opened at 2007-07-28 15:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397078&aid=1762702&group_id=29721

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core Framework
Group:  release 4.3
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: David Karnok (karnokd)
Assigned to: Oliver Burn (oburn)
Summary: HideUtilityConstructor marks a surely non-utility class

Initial Comment:
Hello,

When I turn on the HideUtilityConstructor check the following class is reported 
as utility, and gets marked:

public class Someclass {
  public String field1;
  public String field2;
  /**
   * helper method to transform
   * the AnotherClass into the SomeClass
   */
  public static Someclass transform(AnotherClass cl) {
    // something
  }
}

I'm sure it is not. It seems that this checks operates on the following rules: 
if class has static method and doesnt have instance method, it is an utility 
class.

I think it should be something like this: if class has only (static methods 
and/or static fields) it is an utility class.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397078&aid=1762702&group_id=29721

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/


<Prev in Thread] Current Thread [Next in Thread>