Update of /cvsroot/fb-contrib/fb-contrib/etc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22422/etc
Modified Files:
findbugs.xml messages.xml
Log Message:
new SMII detector, intial checkin
Index: messages.xml
===================================================================
RCS file: /cvsroot/fb-contrib/fb-contrib/etc/messages.xml,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- messages.xml 8 Nov 2005 05:18:10 -0000 1.31
+++ messages.xml 16 Nov 2005 05:46:24 -0000 1.32
@@ -251,10 +251,24 @@
<p> Looks for methods that have finally blocks that return values
or throw exceptions. This code will swallow normal program flow and
hide real program logic.
+ </p>
+ <p>It is a fast detector</p>
]]>
</Details>
</Detector>
+ <Detector class="com.mebigfatguy.fbcontrib.detect.StaticMethodInstanceInvocation">
+ <Details>
+ <![CDATA[
+ <p> Looks for methods that make static method calls using an instance reference.
+ For documentation purposes, it is better to call the method using the class name.
+ This may represent a change in definition that should be noticed.
+ </p>
+ <p>It is a fast detector</p>
+ ]]>
+ </Details>
+ </Detector>
+
<!-- BugPattern -->
<BugPattern type="ISB_INEFFICIENT_STRING_BUFFERING">
@@ -489,6 +503,20 @@
</Details>
</BugPattern>
+ <BugPattern type="SMII_STATIC_METHOD_INSTANCE_INVOCATION">
+ <ShortDescription>method calls static method on instance reference</ShortDescription>
+ <LongDescription>method {1} calls static method on instance reference</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This method makes a static method call on an instance reference. For
+ reading comprehension of the code is better to call the method on the class,
+ rather than an instance. Perhaps this method's static nature has changed since
+ this code was written, and should be revisited.
+ </p>
+ ]]>
+ </Details>
+ </BugPattern>
+
<!-- BugCode -->
<BugCode abbrev="ISB">Inefficient String Buffering</BugCode>
@@ -510,5 +538,6 @@
<BugCode abbrev="NCMU">Non Collection Method Use</BugCode>
<BugCode abbrev="CAO">Confusing Autoboxed Overloading</BugCode>
<BugCode abbrev="AFBR">Abnormal Finally Block Return</BugCode>
+ <BugCode abbrev="SMII">Static Method Instance Invocation</BugCode>
</MessageCollection>
\ No newline at end of file
Index: findbugs.xml
===================================================================
RCS file: /cvsroot/fb-contrib/fb-contrib/etc/findbugs.xml,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- findbugs.xml 8 Nov 2005 05:18:10 -0000 1.36
+++ findbugs.xml 16 Nov 2005 05:46:24 -0000 1.37
@@ -90,6 +90,10 @@
speed="fast"
reports="AFBR_ABNORMAL_FINALLY_BLOCK_RETURN" />
+ <Detector class="com.mebigfatguy.fbcontrib.detect.StaticMethodInstanceInvocation"
+ speed="fast"
+ reports="SMII_STATIC_METHOD_INSTANCE_INVOCATION" />
+
<!-- BugPattern -->
<BugPattern abbrev="ISB" type="ISB_INEFFICIENT_STRING_BUFFERING" category="PERFORMANCE" />
@@ -111,5 +115,6 @@
<BugPattern abbrev="NCMU" type="NCMU_NON_COLLECTION_METHOD_USE" category="STYLE" experimental="true" />
<BugPattern abbrev="CAO" type="CAO_CONFUSING_AUTOBOXED_OVERLOADING" category="CORRECTNESS" experimental="true" />
<BugPattern abbrev="AFBR" type="AFBR_ABNORMAL_FINALLY_BLOCK_RETURN" category="CORRECTNESS" experimental="true" />
+ <BugPattern abbrev="SMII" type="SMII_STATIC_METHOD_INSTANCE_INVOCATION" category="STYLE" experimental="true" />
</FindbugsPlugin>
\ No newline at end of file
|