[Fb-contrib-commit] fb-contrib/etc findbugs.xml,1.15,1.16 messages.xml,1.14,1.15
Brought to you by:
dbrosius
From: Dave B. <dbr...@us...> - 2005-09-22 05:28:37
|
Update of /cvsroot/fb-contrib/fb-contrib/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17178/etc Modified Files: findbugs.xml messages.xml Log Message: Initial Checkin: New detector DLC, find members declared as Lists that probably should be defined as Sets Index: messages.xml =================================================================== RCS file: /cvsroot/fb-contrib/fb-contrib/etc/messages.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- messages.xml 20 Sep 2005 02:28:42 -0000 1.14 +++ messages.xml 22 Sep 2005 05:28:28 -0000 1.15 @@ -115,9 +115,10 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.FinalParameters"> <Details> <![CDATA[ - <p> Looks for methods that do not write to parameters, but do not declare these parameters final. - Doing so helps document the behaviour of the method, and may help the jvm to optimize the method - call.</p> + <p> Looks for classes that define fields that derive from java.util.List but are used to some extent + like a set class. Because set-type operations are performed using a linear search, performance is + going to be inferior to a Set class. If this List is going to remain very small, this may not + be a problem, but if the List may grow large, performance will suffer significantly.</p> <p>It is a fast detector</p> ]]> </Details> @@ -145,6 +146,17 @@ </Details> </Detector> + <Detector class="com.mebigfatguy.fbcontrib.detect.DubiousListCollection"> + <Details> + <![CDATA[ + <p> Looks for constructors of non final classes that make method calls to non final methods. + As these methods could be overridden, the overridden method will be accessing an object that + is only partially constructed, perhaps causing problems.</p> + <p>It is a fast detector</p> + ]]> + </Details> + </Detector> + <!-- BugPattern --> <BugPattern type="ISB_INEFFICIENT_STRING_BUFFERING"> @@ -282,6 +294,18 @@ </Details> </BugPattern> + <BugPattern type="DLC_DUBIOUS_LIST_COLLECTION"> + <ShortDescription>class defines List based fields but uses them like Sets</ShortDescription> + <LongDescription>class {0} defines List based fields but uses them like Sets</LongDescription> + <Details> + <![CDATA[ + <p>This class defines a field based on java.util.List, but uses it to some extent like a Set. Since + lookup type operations are performed using a linear search for Lists, the performance for large + Lists will be poor. Consider changing this fields implementation to a set based one.</p> + ]]> + </Details> + </BugPattern> + <!-- BugCode --> <BugCode abbrev="ISB">Inefficient String Buffering</BugCode> @@ -295,5 +319,6 @@ <BugCode abbrev="FP">Final Parameters</BugCode> <BugCode abbrev="LSC">Literal String Comparison</BugCode> <BugCode abbrev="PCOA">Partially Constructed Object Access</BugCode> + <BugCode abbrev="DLC">Dubious List Collection</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.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- findbugs.xml 20 Sep 2005 02:28:42 -0000 1.15 +++ findbugs.xml 22 Sep 2005 05:28:28 -0000 1.16 @@ -58,6 +58,11 @@ speed="fast" reports="PCOA_PARTIALLY_CONSTRUCTED_OBJECT_ACCESS" /> + <Detector class="com.mebigfatguy.fbcontrib.detect.DubiousListCollection" + speed="fast" + reports="DLC_DUBIOUS_LIST_COLLECTION" + hidden="true" /> + <!-- BugPattern --> <BugPattern abbrev="ISB" type="ISB_INEFFICIENT_STRING_BUFFERING" category="PERFORMANCE" /> @@ -71,5 +76,6 @@ <BugPattern abbrev="FP" type="FP_FINAL_PARAMETERS" category="STYLE" experimental="true" /> <BugPattern abbrev="LSC" type="LSC_LITERAL_STRING_COMPARISON" category="STYLE" experimental="true" /> <BugPattern abbrev="PCOA" type="PCOA_PARTIALLY_CONSTRUCTED_OBJECT_ACCESS" category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="DLC" type="DLC_DUBIOUS_LIST_COLLECTION" category="PERFORMANCE" experimental="true" /> </FindbugsPlugin> \ No newline at end of file |