Update of /cvsroot/fb-contrib/fb-contrib/etc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12646/etc
Modified Files:
findbugs.xml messages.xml
Log Message:
initial checkin - new STS detector
Index: messages.xml
===================================================================
RCS file: /cvsroot/fb-contrib/fb-contrib/etc/messages.xml,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- messages.xml 16 Nov 2005 05:46:24 -0000 1.32
+++ messages.xml 1 Dec 2005 05:28:42 -0000 1.33
@@ -269,6 +269,20 @@
</Details>
</Detector>
+ <Detector class="com.mebigfatguy.fbcontrib.detect.SpuriousThreadStates">
+ <Details>
+ <![CDATA[
+ <p> Looks for methods that call wait, notify or notifyAll on an instance of a
+ java.lang.Thread. Since the internal workings of the threads is to synchronize on the
+ thread itself, introducing client calls will confuse the thread state of the object
+ in question, and will cause spurious thread state changes, either waking threads up
+ when not intended, or removing the the thread from the runnable state.</p>
+ </p>
+ <p>It is a fast detector</p>
+ ]]>
+ </Details>
+ </Detector>
+
<!-- BugPattern -->
<BugPattern type="ISB_INEFFICIENT_STRING_BUFFERING">
@@ -517,6 +531,20 @@
</Details>
</BugPattern>
+ <BugPattern type="STS_SPURIOUS_THREAD_STATES">
+ <ShortDescription>method calls wait, notify or notifyAll on a Thread instance</ShortDescription>
+ <LongDescription>method {1} calls wait, notify or notifyAll on a Thread instance</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This method invokes the methods wait, notify or notifyAll on a Thread instance.
+ Doing so will confuse the internal thread state behaviour causing spurious thread
+ wakeups/sleeps because the internal mechanism also uses the thread instance for it's
+ notifications.
+ </p>
+ ]]>
+ </Details>
+ </BugPattern>
+
<!-- BugCode -->
<BugCode abbrev="ISB">Inefficient String Buffering</BugCode>
@@ -539,5 +567,5 @@
<BugCode abbrev="CAO">Confusing Autoboxed Overloading</BugCode>
<BugCode abbrev="AFBR">Abnormal Finally Block Return</BugCode>
<BugCode abbrev="SMII">Static Method Instance Invocation</BugCode>
-
+ <BugCode abbrev="STS">Spurious Thread States</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.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- findbugs.xml 1 Dec 2005 03:29:27 -0000 1.38
+++ findbugs.xml 1 Dec 2005 05:28:42 -0000 1.39
@@ -93,6 +93,10 @@
<Detector class="com.mebigfatguy.fbcontrib.detect.StaticMethodInstanceInvocation"
speed="fast"
reports="SMII_STATIC_METHOD_INSTANCE_INVOCATION" />
+
+ <Detector class="com.mebigfatguy.fbcontrib.detect.SpuriousThreadStates"
+ speed="fast"
+ reports="STS_SPURIOUS_THREAD_STATES" />
<!-- BugPattern -->
@@ -116,5 +120,6 @@
<BugPattern abbrev="CAO" type="CAO_CONFUSING_AUTOBOXED_OVERLOADING" category="CORRECTNESS" />
<BugPattern abbrev="AFBR" type="AFBR_ABNORMAL_FINALLY_BLOCK_RETURN" category="CORRECTNESS" />
<BugPattern abbrev="SMII" type="SMII_STATIC_METHOD_INSTANCE_INVOCATION" category="STYLE" />
+ <BugPattern abbrev="STS" type="STS_SPURIOUS_THREAD_STATES" category="MT_CORRECTNESS" />
</FindbugsPlugin>
\ No newline at end of file
|