[Fb-contrib-commit] SF.net SVN: fb-contrib:[1351] trunk/fb-contrib/etc/messages.xml
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-10-03 15:43:57
|
Revision: 1351
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1351&view=rev
Author: dbrosius
Date: 2009-10-03 15:43:50 +0000 (Sat, 03 Oct 2009)
Log Message:
-----------
new detector NSE
Modified Paths:
--------------
trunk/fb-contrib/etc/messages.xml
Modified: trunk/fb-contrib/etc/messages.xml
===================================================================
--- trunk/fb-contrib/etc/messages.xml 2009-10-03 15:43:35 UTC (rev 1350)
+++ trunk/fb-contrib/etc/messages.xml 2009-10-03 15:43:50 UTC (rev 1351)
@@ -1035,6 +1035,18 @@
]]>
</Details>
</Detector>
+
+ <Detector class="com.mebigfatguy.fbcontrib.detect.NonSymmetricEquals">
+ <Details>
+ <![CDATA[
+ <p>looks for classes that break the fundamental rule of equivalence, which is
+ symmetry. If a equals b, then b equals a. While it is usually wrong to allow
+ equals to compare different types, at the very least you should make sure that
+ each class knows about each other and is able to compare themselves with each other.</p>
+ <p>It is a fast detector</p>
+ ]]>
+ </Details>
+ </Detector>
<!-- BugPattern -->
@@ -2680,6 +2692,20 @@
</Details>
</BugPattern>
+ <BugPattern type="NSE_NON_SYMMETRIC_EQUALS">
+ <ShortDescription>Equals method compares this object against other types in a non symmetric way</ShortDescription>
+ <LongDescription>Equals method {1} compares this object against other types in a non symmetric way</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This class implements an equals method that compares this object against another type of object.
+ This is almost always a bad thing to do, but if it is to be done, you must make sure that the basic
+ symmetry rule of equivalence is maintained, that being if a equals b, then b equals a. It does not
+ appear that the class that is being compared to this class knows about this class, and doesn't compare itself
+ to this.</p>
+ ]]>
+ </Details>
+ </BugPattern>
+
<!-- BugCode -->
<BugCode abbrev="ISB">Inefficient String Buffering</BugCode>
@@ -2767,4 +2793,5 @@
<BugCode abbrev="IKNC">Inconsistent Key Name Casing</BugCode>
<BugCode abbrev="OC">Overzealous Casting</BugCode>
<BugCode abbrev="PDP">Poorly Defined Parameter</BugCode>
+ <BugCode abbrev="NSE">Non Symmetric Equals</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.
|