[Fb-contrib-commit] fb-contrib/etc findbugs.xml,1.9,1.10 messages.xml,1.8,1.9
Brought to you by:
dbrosius
From: Dave B. <dbr...@us...> - 2005-09-15 04:03:21
|
Update of /cvsroot/fb-contrib/fb-contrib/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20538/etc Modified Files: findbugs.xml messages.xml Log Message: Initial Checkin: DRE Index: messages.xml =================================================================== RCS file: /cvsroot/fb-contrib/fb-contrib/etc/messages.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- messages.xml 13 Sep 2005 05:46:39 -0000 1.8 +++ messages.xml 15 Sep 2005 04:03:12 -0000 1.9 @@ -83,6 +83,19 @@ determine type. A better design usually can be had by creating a seperate class, which defines the different types required, and add an instance of that class to the collection, or array.</p> + <p>It is a fast detector</p> + ]]> + </Details> + </Detector> + + <Detector class="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException"> + <Details> + <![CDATA[ + <p> Looks for methods that declare Runtime exceptions in their throws clause. While doing + so is not illegal, it may represent a misunderstanding as to the exception in question. + If a RuntimeException is declared, it implies that this exception type is expected to happen, + which if true, should be handled in code, and not propogated. </p> + <p>It is a fast detector</p> ]]> </Details> </Detector> @@ -162,6 +175,19 @@ </Details> </BugPattern> + <BugPattern type="DRE_DECLARED_RUNTIME_EXCEPTION"> + <ShortDescription>method declares RuntimeException in throws clause</ShortDescription> + <LongDescription>method {1} declares RuntimeException in throws clause</LongDescription> + <Details> + <![CDATA[ + <p>This method declares a RuntimeException derived class in it's throws clause. + This may indicate a misunderstanding as to how unchecked exceptions are handled. + If is felt that a RuntimeException is so prevalent that it should be declared, it + is probably a better idea to prevent the occurance in code.</p> + ]]> + </Details> + </BugPattern> + <!-- BugCode --> <BugCode abbrev="ISB">Inefficient String Buffering</BugCode> @@ -170,5 +196,6 @@ <BugCode abbrev="OCP">Overly Concrete Parameters</BugCode> <BugCode abbrev="LII">List Indexed Iterating</BugCode> <BugCode abbrev="UCC">Unrelated Collection Contents</BugCode> + <BugCode abbrev="DRE">Declared Runtime Exception</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.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- findbugs.xml 13 Sep 2005 05:46:39 -0000 1.9 +++ findbugs.xml 15 Sep 2005 04:03:12 -0000 1.10 @@ -37,6 +37,10 @@ speed="fast" reports="UCC_UNRELATED_COLLECTION_CONTENTS" /> + <Detector class="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" + speed="fast" + reports="DRE_DECLARED_RUNTIME_EXCEPTION" /> + <!-- BugPattern --> <BugPattern abbrev="ISB" type="ISB_INEFFICIENT_STRING_BUFFERING" category="PERFORMANCE" /> @@ -45,5 +49,6 @@ <BugPattern abbrev="OCP" type="OCP_OVERLY_CONCRETE_PARAMETER" category="STYLE" experimental="true" /> <BugPattern abbrev="LII" type="LII_LIST_INDEXED_ITERATING" category="PERFORMANCE" experimental="true" /> <BugPattern abbrev="UCC" type="UCC_UNRELATED_COLLECTION_CONTENTS" category="STYLE" experimental="true" /> + <BugPattern abbrev="DRE" type="DRE_DECLARED_RUNTIME_EXCEPTION" category="STYLE" experimental="true" /> </FindbugsPlugin> \ No newline at end of file |