Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#291 Absence of private default constructor for class containing static methods only

3.x
open
nobody
None
5
2014-06-19
2013-10-31
Tagir Valeev
No

There's an InstantiateStaticClass detector (switched off by default, I know), which detects creation of the objects based on classes that only define static methods (utility classes). This is great. But even if such objects are not actually created, this detector might issue a warning if such utility class has no private constructor, so it can be possibly mistakenly instantiated in future. Rank should be 20, Category BAD_PRACTICE, Confidence Low. Detector should exclude cases when class has subclasses.

Discussion

    • Group: 3.0.0 --> 3.0.1