[Fb-contrib-commit] SF.net SVN: fb-contrib:[1368] trunk/fb-contrib/etc/messages.xml
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-10-15 03:34:15
|
Revision: 1368
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1368&view=rev
Author: dbrosius
Date: 2009-10-15 03:34:03 +0000 (Thu, 15 Oct 2009)
Log Message:
-----------
add new detector CVAA - by Bhaskar Maddala
Modified Paths:
--------------
trunk/fb-contrib/etc/messages.xml
Modified: trunk/fb-contrib/etc/messages.xml
===================================================================
--- trunk/fb-contrib/etc/messages.xml 2009-10-15 03:33:46 UTC (rev 1367)
+++ trunk/fb-contrib/etc/messages.xml 2009-10-15 03:34:03 UTC (rev 1368)
@@ -1047,6 +1047,25 @@
]]>
</Details>
</Detector>
+
+ <Detector class="com.mebigfatguy.fbcontrib.detect.ContraVariantArrayAssignment">
+ <Details>
+ <![CDATA[
+ <p>Finds contravariant array assignments. Since arrays are mutable data structures, their use
+ must be restricted to covariant or invariant usage</p>
+
+ <pre>
+ class A {}
+ class B extends A {}
+
+ B[] b = new B[2];
+ A[] a = b;
+ a[0] = new A(); // results in ArrayStoreException (Runtime)
+ </pre>
+ <p>It is a fast detector</p>
+ ]]>
+ </Details>
+ </Detector>
<!-- BugPattern -->
@@ -2706,6 +2725,27 @@
</Details>
</BugPattern>
+ <BugPattern type="CVAA_CONTRAVARIANT_ARRAY_ASSIGNMENT">
+ <ShortDescription>method performs a contravariant array assignment</ShortDescription>
+ <LongDescription>method {1} performs a contravariant array assignment</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>Finds contravariant array assignments. Since arrays are mutable data structures, their use
+ must be restricted to covariant or invariant usage</p>
+
+ <pre>
+ class A {}
+ class B extends A {}
+
+ B[] b = new B[2];
+ A[] a = b;
+ a[0] = new A(); // results in ArrayStoreException (Runtime)
+ </pre>
+ <p>It is a fast detector</p>
+ ]]>
+ </Details>
+ </BugPattern>
+
<!-- BugCode -->
<BugCode abbrev="ISB">Inefficient String Buffering</BugCode>
@@ -2794,4 +2834,5 @@
<BugCode abbrev="OC">Overzealous Casting</BugCode>
<BugCode abbrev="PDP">Poorly Defined Parameter</BugCode>
<BugCode abbrev="NSE">Non Symmetric Equals</BugCode>
+ <BugCode abbrev="CVAA">Contravariant Array Assignment</BugCode>
</MessageCollection>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|