[Fb-contrib-commit] SF.net SVN: fb-contrib:[1783] trunk/fb-contrib
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2015-11-25 21:52:04
|
Revision: 1783
http://sourceforge.net/p/fb-contrib/code/1783
Author: dbrosius
Date: 2015-11-25 21:51:59 +0000 (Wed, 25 Nov 2015)
Log Message:
-----------
sync from github
Modified Paths:
--------------
trunk/fb-contrib/.classpath
trunk/fb-contrib/build.xml
trunk/fb-contrib/etc/bugrank.txt
trunk/fb-contrib/etc/findbugs.xml
trunk/fb-contrib/etc/messages.xml
trunk/fb-contrib/htdocs/index.shtml
trunk/fb-contrib/htdocs/repository.html
trunk/fb-contrib/pom.xml
trunk/fb-contrib/samples/AWCBR_Sample.java
trunk/fb-contrib/samples/LSC_Sample.java
trunk/fb-contrib/samples/LSYC_Sample.java
trunk/fb-contrib/samples/OCP_Sample.java
trunk/fb-contrib/samples/OPM_Sample.java
trunk/fb-contrib/samples/SCRV_Sample.java
trunk/fb-contrib/samples/SPP_Sample.java
trunk/fb-contrib/samples/UTAO_Sample.java
trunk/fb-contrib/samples/WOC_Sample.java
trunk/fb-contrib/samples/samples.fbp
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/CollectMethodsReturningImmutableCollections.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/debug/Debug.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ArrayIndexOutOfBounds.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BogusExceptionDeclaration.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CharsetIssues.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CloneUsability.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CollectionNamingConfusion.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CommonsStringBuilderToString.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConflatingResourcesAndFiles.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConflictingTimeUnits.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingArrayAsList.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingFunctionSemantics.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ContainsBasedConditional.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CustomBuiltXML.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FinalParameters.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/HangingExecutors.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/HttpClientProblems.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/IncorrectInternalClassUse.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InvalidConstantArgument.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LingeringGraphicsObjects.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LocalTypeDetector.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LoggerOddities.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MissingMethodsDetector.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ModifyingUnmodifiableCollection.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MoreDumbMethods.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonCollectionMethodUse.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonProductiveMethodCall.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OrphanedDOMNode.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyPermissiveMethod.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleConstantAllocationInLoop.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleIncompleteSerialization.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PresizeCollections.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ReflectionOnObjectMethods.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/Section508Compliance.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnitTestAssertionOddities.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/Unjitable.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseCharacterParameterizedMethod.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseEnumCollections.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseVarArgs.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WriteOnlyCollection.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/BugType.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/PublicAPI.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/SignatureUtils.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/ToString.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/Values.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/XClassUtils.java
trunk/fb-contrib/yank.xls
Added Paths:
-----------
trunk/fb-contrib/samples/IMC_Sample.java
trunk/fb-contrib/samples/JXI_Sample.java
trunk/fb-contrib/samples/STT_Sample.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ImmatureClass.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JAXRSIssues.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/RuntimeExceptionDeclared.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StringifiedTypes.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/FQMethod.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/UnmodifiableSet.java
Removed Paths:
-------------
trunk/fb-contrib/samples/CIS_Sample.java
trunk/fb-contrib/samples/SC_Sample.java
trunk/fb-contrib/samples/SMA_Sample.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ClassImpersonatingString.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StutteredMethodArguments.java
Modified: trunk/fb-contrib/.classpath
===================================================================
--- trunk/fb-contrib/.classpath 2015-08-22 22:14:18 UTC (rev 1782)
+++ trunk/fb-contrib/.classpath 2015-11-25 21:51:59 UTC (rev 1783)
@@ -24,8 +24,8 @@
</classpathentry>
<classpathentry kind="lib" path="lib/commons-codec-1.6.jar"/>
<classpathentry kind="lib" path="lib/findbugs-3.0.1.jar" sourcepath="lib/sources/findbugs-3.0.1-sources.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/findbugs"/>
<classpathentry kind="lib" path="lib/junit-4.12.jar"/>
<classpathentry kind="lib" path="lib/testng-6.9.6.jar"/>
+ <classpathentry kind="lib" path="lib/jsr311-api-1.1.1.jar" sourcepath="lib/sources/jsr311-api-1.1.1-sources.jar"/>
<classpathentry kind="output" path="target/classes/main"/>
</classpath>
Modified: trunk/fb-contrib/build.xml
===================================================================
--- trunk/fb-contrib/build.xml 2015-08-22 22:14:18 UTC (rev 1782)
+++ trunk/fb-contrib/build.xml 2015-11-25 21:51:59 UTC (rev 1783)
@@ -15,8 +15,8 @@
<property name="samples.classes.dir" value="${target.dir}/classes/samples" />
<property name="javadoc.dir" value="${target.dir}/javadoc" />
<property name="htdocs.dir" value="${basedir}/htdocs" />
- <property name="javac.source" value="1.6" />
- <property name="javac.target" value="1.6" />
+ <property name="javac.source" value="1.7" />
+ <property name="javac.target" value="1.7" />
<property name="javac.deprecation" value="on" />
<property name="javac.debug" value="on" />
@@ -32,7 +32,7 @@
<target name="infra_jars" description="pull jars needed to build fb-contrib to ${user.dir}/.ant/lib">
<mkdir dir="${user.home}/.ant/lib" />
<get src="http://repo1.maven.org/maven2/com/mebigfatguy/yank/yank/1.4.0/yank-1.4.0.jar" dest="${user.home}/.ant/lib"/>
- <get src="https://bitbucket.org/klubick/bugrankcheckstyle/downloads/bug-rank-check-style-1.0.0.jar" dest="${user.home}/.ant/lib"/>
+ <get src="https://bitbucket.org/kjlubick/bugrankcheckstyle/downloads/bug-rank-check-style-1.0.0.jar" dest="${user.home}/.ant/lib"/>
<get src="http://repo1.maven.org/maven2/com/mebigfatguy/vcsversion/vcsversion/0.4.0/vcsversion-0.4.0.jar" dest="${user.home}/.ant/lib"/>
</target>
@@ -92,6 +92,7 @@
<pathelement location="${lib.dir}/httpcore-${httpcore.version}.jar" />
<pathelement location="${lib.dir}/httpclient-${httpclient.version}.jar" />
<pathelement location="${lib.dir}/commons-codec-${commons-codec.version}.jar" />
+ <pathelement location="${lib.dir}/jsr311-api-${jsr311-api.version}.jar" />
</path>
</target>
Modified: trunk/fb-contrib/etc/bugrank.txt
===================================================================
--- trunk/fb-contrib/etc/bugrank.txt 2015-08-22 22:14:18 UTC (rev 1782)
+++ trunk/fb-contrib/etc/bugrank.txt 2015-11-25 21:51:59 UTC (rev 1783)
@@ -22,8 +22,6 @@
+2 BugPattern CE_CLASS_ENVY
+0 BugPattern CFS_CONFUSING_FUNCTION_SEMANTICS
+0 BugPattern CHTH_COMMONS_HASHCODE_BUILDER_TOHASHCODE
-+0 BugPattern CIS_STRING_PARSING_A_FIELD
-+0 BugPattern CIS_TOSTRING_STORED_IN_FIELD
+0 BugPattern CLI_CONSTANT_LIST_INDEX
+0 BugPattern CNC_COLLECTION_NAMING_CONFUSION
+0 BugPattern COM_COPIED_OVERRIDDEN_METHOD
@@ -62,6 +60,10 @@
+0 BugPattern IICU_INCORRECT_INTERNAL_CLASS_USE
+0 BugPattern IKNC_INCONSISTENT_HTTP_ATTRIBUTE_CASING
+0 BugPattern IKNC_INCONSISTENT_HTTP_PARAM_CASING
++2 BugPattern IMC_IMMATURE_CLASS_NO_EQUALS
++2 BugPattern IMC_IMMATURE_CLASS_NO_HASHCODE
++0 BugPattern IMC_IMMATURE_CLASS_NO_PACKAGE
++2 BugPattern IMC_IMMATURE_CLASS_NO_TOSTRING
+0 BugPattern IPU_IMPROPER_PROPERTIES_USE
+0 BugPattern IPU_IMPROPER_PROPERTIES_USE_SETPROPERTY
+0 BugPattern ISB_EMPTY_STRING_APPENDING
@@ -70,6 +72,10 @@
+0 BugPattern ITC_INHERITANCE_TYPE_CHECKING
+2 BugPattern ITU_INAPPROPRIATE_TOSTRING_USE
+0 BugPattern JVR_JDBC_VENDOR_RELIANCE
++0 BugPattern JXI_GET_ENDPOINT_CONSUMES_CONTENT
++0 BugPattern JXI_INVALID_CONTEXT_PARAMETER_TYPE
++0 BugPattern JXI_PARM_PARAM_NOT_FOUND_IN_PATH
++0 BugPattern JXI_UNDEFINED_PARAMETER_SOURCE_IN_ENDPOINT
+0 BugPattern LEST_LOST_EXCEPTION_STACK_TRACE
+0 BugPattern LGO_LINGERING_GRAPHICS_OBJECT
+2 BugPattern LII_LIST_INDEXED_ITERATING
@@ -147,9 +153,9 @@
+0 BugPattern SCII_SPOILED_CHILD_INTERFACE_IMPLEMENTATOR
+0 BugPattern SCII_SPOILED_CHILD_INTERFACE_IMPLEMENTOR
+0 BugPattern SCI_SYNCHRONIZED_COLLECTION_ITERATORS
++0 BugPattern SCRV_SUSPICIOUS_COMPARATOR_RETURN_VALUES
+0 BugPattern SCR_SLOPPY_CLASS_REFLECTION
+0 BugPattern SCSS_SUSPICIOUS_CLUSTERED_SESSION_SUPPORT
-+0 BugPattern SC_SUSPICIOUS_COMPARATOR_RETURN_VALUES
+0 BugPattern SEC_SIDE_EFFECT_CONSTRUCTOR
+0 BugPattern SGSU_SUSPICIOUS_GETTER_SETTER_USE
+0 BugPattern SG_SLUGGISH_GUI
@@ -194,6 +200,8 @@
+0 BugPattern SPP_USE_STRINGBUILDER_LENGTH
+0 BugPattern STB_STACKED_TRY_BLOCKS
+2 BugPattern STS_SPURIOUS_THREAD_STATES
++0 BugPattern STT_STRING_PARSING_A_FIELD
++0 BugPattern STT_TOSTRING_STORED_IN_FIELD
+0 BugPattern SUA_SUSPICIOUS_UNINITIALIZED_ARRAY
+0 BugPattern SWCO_SUSPICIOUS_WAIT_ON_CONCURRENT_OBJECT
+0 BugPattern TBP_TRISTATE_BOOLEAN_PATTERN
@@ -218,6 +226,10 @@
+0 BugPattern UTAO_JUNIT_ASSERTION_ODDITIES_INEXACT_DOUBLE
+2 BugPattern UTAO_JUNIT_ASSERTION_ODDITIES_NO_ASSERT
+0 BugPattern UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_EQUALS
++0 BugPattern UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_EQUALS
++0 BugPattern UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL
++0 BugPattern UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NULL
++1 BugPattern UTAO_JUNIT_ASSERTION_ODDITIES_USING_DEPRECATED
+0 BugPattern UTAO_TESTNG_ASSERTION_ODDITIES_ACTUAL_CONSTANT
+0 BugPattern UTAO_TESTNG_ASSERTION_ODDITIES_ASSERT_USED
+0 BugPattern UTAO_TESTNG_ASSERTION_ODDITIES_BOOLEAN_ASSERT
@@ -225,6 +237,9 @@
+0 BugPattern UTAO_TESTNG_ASSERTION_ODDITIES_INEXACT_DOUBLE
+2 BugPattern UTAO_TESTNG_ASSERTION_ODDITIES_NO_ASSERT
+0 BugPattern UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_EQUALS
++0 BugPattern UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NOT_EQUALS
++0 BugPattern UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL
++0 BugPattern UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NULL
+0 BugPattern UTA_USE_TO_ARRAY
+0 BugPattern UVA_USE_VAR_ARGS
+0 BugPattern WEM_OBSCURING_EXCEPTION
Modified: trunk/fb-contrib/etc/findbugs.xml
===================================================================
--- trunk/fb-contrib/etc/findbugs.xml 2015-08-22 22:14:18 UTC (rev 1782)
+++ trunk/fb-contrib/etc/findbugs.xml 2015-11-25 21:51:59 UTC (rev 1783)
@@ -28,8 +28,6 @@
<Detector class="com.mebigfatguy.fbcontrib.detect.BloatedSynchronizedBlock" speed="fast" reports="BSB_BLOATED_SYNCHRONIZED_BLOCK" hidden="true" />
- <Detector class="com.mebigfatguy.fbcontrib.detect.StutteredMethodArguments" speed="fast" reports="SMA_STUTTERED_METHOD_ARGUMENTS" hidden="true" />
-
<Detector class="com.mebigfatguy.fbcontrib.detect.StackedTryBlocks" speed="fast" reports="STB_STACKED_TRY_BLOCKS" />
<Detector class="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" speed="fast" reports="BAS_BLOATED_ASSIGNMENT_SCOPE" hidden="true" />
@@ -50,7 +48,7 @@
<Detector class="com.mebigfatguy.fbcontrib.detect.UnrelatedCollectionContents" speed="fast" reports="UCC_UNRELATED_COLLECTION_CONTENTS" />
- <Detector class="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" speed="fast" reports="DRE_DECLARED_RUNTIME_EXCEPTION" />
+ <Detector class="com.mebigfatguy.fbcontrib.detect.RuntimeExceptionDeclared" speed="fast" reports="DRE_DECLARED_RUNTIME_EXCEPTION" />
<Detector class="com.mebigfatguy.fbcontrib.detect.LiteralStringComparison" speed="fast" reports="LSC_LITERAL_STRING_COMPARISON" />
@@ -146,10 +144,10 @@
<Detector class="com.mebigfatguy.fbcontrib.detect.PossibleIncompleteSerialization" speed="fast" reports="PIS_POSSIBLE_INCOMPLETE_SERIALIZATION" />
- <Detector class="com.mebigfatguy.fbcontrib.detect.SuspiciousComparatorReturnValues" speed="fast" reports="SC_SUSPICIOUS_COMPARATOR_RETURN_VALUES" />
+ <Detector class="com.mebigfatguy.fbcontrib.detect.SuspiciousComparatorReturnValues" speed="fast" reports="SCRV_SUSPICIOUS_COMPARATOR_RETURN_VALUES" />
<Detector class="com.mebigfatguy.fbcontrib.detect.SillynessPotPourri" speed="fast"
- reports="SPP_NEGATIVE_BITSET_ITEM,SPP_INTERN_ON_CONSTANT,SPP_NO_CHAR_SB_CTOR,SPP_USE_MATH_CONSTANT,SPP_STUTTERED_ASSIGNMENT,SPP_USE_ISNAN,SPP_USE_BIGDECIMAL_STRING_CTOR,SPP_STRINGBUFFER_WITH_EMPTY_STRING,SPP_EQUALS_ON_ENUM,SPP_INVALID_BOOLEAN_NULL_CHECK,SPP_USE_CHARAT,SPP_USELESS_TERNARY,SPP_SUSPECT_STRING_TEST,SPP_USE_STRINGBUILDER_LENGTH,SPP_INVALID_CALENDAR_COMPARE,SPP_USE_CONTAINSKEY,SPP_USE_ISEMPTY,SPP_USE_GETPROPERTY,SPP_USELESS_CASING,SPP_NON_ARRAY_PARM,SPP_EMPTY_CASING,SPP_TEMPORARY_TRIM,SPP_STRINGBUILDER_IS_MUTABLE,SPP_USE_GET0,SPP_DOUBLE_APPENDED_LITERALS,SPP_NULL_BEFORE_INSTANCEOF,SPP_NON_USEFUL_TOSTRING,SPP_TOSTRING_ON_STRING,SPP_EQUALS_ON_STRING_BUILDER,SPP_CONVERSION_OF_STRING_LITERAL,SPP_STATIC_FORMAT_STRING" />
+ reports="SPP_NEGATIVE_BITSET_ITEM,SPP_INTERN_ON_CONSTANT,SPP_NO_CHAR_SB_CTOR,SPP_USE_MATH_CONSTANT,SPP_STUTTERED_ASSIGNMENT,SPP_USE_ISNAN,SPP_USE_BIGDECIMAL_STRING_CTOR,SPP_STRINGBUFFER_WITH_EMPTY_STRING,SPP_EQUALS_ON_ENUM,SPP_INVALID_BOOLEAN_NULL_CHECK,SPP_USE_CHARAT,SPP_USELESS_TERNARY,SPP_SUSPECT_STRING_TEST,SPP_USE_STRINGBUILDER_LENGTH,SPP_INVALID_CALENDAR_COMPARE,SPP_USE_CONTAINSKEY,SPP_USE_ISEMPTY,SPP_USE_GETPROPERTY,SPP_USELESS_CASING,SPP_SERIALVER_SHOULD_BE_PRIVATE,SPP_NON_ARRAY_PARM,SPP_EMPTY_CASING,SPP_TEMPORARY_TRIM,SPP_STRINGBUILDER_IS_MUTABLE,SPP_USE_GET0,SPP_DOUBLE_APPENDED_LITERALS,SPP_NULL_BEFORE_INSTANCEOF,SPP_NON_USEFUL_TOSTRING,SPP_TOSTRING_ON_STRING,SPP_EQUALS_ON_STRING_BUILDER,SPP_CONVERSION_OF_STRING_LITERAL,SPP_STATIC_FORMAT_STRING" />
<Detector class="com.mebigfatguy.fbcontrib.detect.SpoiledChildInterfaceImplementor" speed="fast" reports="SCII_SPOILED_CHILD_INTERFACE_IMPLEMENTOR" />
@@ -172,7 +170,7 @@
<Detector class="com.mebigfatguy.fbcontrib.detect.ConfusingFunctionSemantics" speed="fast" reports="CFS_CONFUSING_FUNCTION_SEMANTICS" />
<Detector class="com.mebigfatguy.fbcontrib.detect.UnitTestAssertionOddities" speed="fast"
- reports="UTAO_JUNIT_ASSERTION_ODDITIES_ACTUAL_CONSTANT,UTAO_JUNIT_ASSERTION_ODDITIES_INEXACT_DOUBLE,UTAO_JUNIT_ASSERTION_ODDITIES_BOOLEAN_ASSERT,UTAO_JUNIT_ASSERTION_ODDITIES_IMPOSSIBLE_NULL,UTAO_JUNIT_ASSERTION_ODDITIES_ASSERT_USED,UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_EQUALS,UTAO_JUNIT_ASSERTION_ODDITIES_NO_ASSERT,UTAO_TESTNG_ASSERTION_ODDITIES_ACTUAL_CONSTANT,UTAO_TESTNG_ASSERTION_ODDITIES_INEXACT_DOUBLE,UTAO_TESTNG_ASSERTION_ODDITIES_BOOLEAN_ASSERT,UTAO_TESTNG_ASSERTION_ODDITIES_IMPOSSIBLE_NULL,UTAO_TESTNG_ASSERTION_ODDITIES_ASSERT_USED,UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_EQUALS,UTAO_TESTNG_ASSERTION_ODDITIES_NO_ASSERT," />
+ reports="UTAO_JUNIT_ASSERTION_ODDITIES_ACTUAL_CONSTANT,UTAO_JUNIT_ASSERTION_ODDITIES_INEXACT_DOUBLE,UTAO_JUNIT_ASSERTION_ODDITIES_BOOLEAN_ASSERT,UTAO_JUNIT_ASSERTION_ODDITIES_IMPOSSIBLE_NULL,UTAO_JUNIT_ASSERTION_ODDITIES_ASSERT_USED,UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NULL,UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL,UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_EQUALS,UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_EQUALS,UTAO_JUNIT_ASSERTION_ODDITIES_NO_ASSERT,UTAO_JUNIT_ASSERTION_ODDITIES_USING_DEPRECATED,UTAO_TESTNG_ASSERTION_ODDITIES_ACTUAL_CONSTANT,UTAO_TESTNG_ASSERTION_ODDITIES_INEXACT_DOUBLE,UTAO_TESTNG_ASSERTION_ODDITIES_BOOLEAN_ASSERT,UTAO_TESTNG_ASSERTION_ODDITIES_IMPOSSIBLE_NULL,UTAO_TESTNG_ASSERTION_ODDITIES_ASSERT_USED,UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NULL,UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL,UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_EQUALS,UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NOT_EQUALS,UTAO_TESTNG_ASSERTION_ODDITIES_NO_ASSERT," />
<Detector class="com.mebigfatguy.fbcontrib.detect.SuspiciousCloneAlgorithm" speed="fast" reports="SCA_SUSPICIOUS_CLONE_ALGORITHM" />
@@ -289,8 +287,12 @@
<Detector class="com.mebigfatguy.fbcontrib.detect.OverlyPermissiveMethod" speed="fast" reports="OPM_OVERLY_PERMISSIVE_METHOD" />
- <Detector class="com.mebigfatguy.fbcontrib.detect.ClassImpersonatingString" speed="fast" reports="CIS_STRING_PARSING_A_FIELD,CIS_TOSTRING_STORED_IN_FIELD" />
+ <Detector class="com.mebigfatguy.fbcontrib.detect.StringifiedTypes" speed="fast" reports="STT_STRING_PARSING_A_FIELD,STT_TOSTRING_STORED_IN_FIELD" />
+ <Detector class="com.mebigfatguy.fbcontrib.detect.ImmatureClass" speed="moderate" reports="IMC_IMMATURE_CLASS_NO_EQUALS,IMC_IMMATURE_CLASS_NO_HASHCODE,IMC_IMMATURE_CLASS_NO_PACKAGE,IMC_IMMATURE_CLASS_NO_TOSTRING" />
+
+ <Detector class="com.mebigfatguy.fbcontrib.detect.JAXRSIssues" speed="fast" reports="JXI_GET_ENDPOINT_CONSUMES_CONTENT,JXI_INVALID_CONTEXT_PARAMETER_TYPE,JXI_PARM_PARAM_NOT_FOUND_IN_PATH,JXI_UNDEFINED_PARAMETER_SOURCE_IN_ENDPOINT" />
+
<!-- COMMENT OUT FOR POINT RELEASE -->
<!-- BugPattern -->
@@ -369,7 +371,7 @@
<BugPattern abbrev="URV" type="URV_CHANGE_RETURN_TYPE" category="STYLE" />
<BugPattern abbrev="URV" type="URV_INHERITED_METHOD_WITH_RELATED_TYPES" category="STYLE" />
<BugPattern abbrev="PIS" type="PIS_POSSIBLE_INCOMPLETE_SERIALIZATION" category="CORRECTNESS" />
- <BugPattern abbrev="SCRV" type="SC_SUSPICIOUS_COMPARATOR_RETURN_VALUES" category="CORRECTNESS" />
+ <BugPattern abbrev="SCRV" type="SCRV_SUSPICIOUS_COMPARATOR_RETURN_VALUES" category="CORRECTNESS" />
<BugPattern abbrev="SPP" type="SPP_NEGATIVE_BITSET_ITEM" category="CORRECTNESS" />
<BugPattern abbrev="SPP" type="SPP_INTERN_ON_CONSTANT" category="CORRECTNESS" />
<BugPattern abbrev="SPP" type="SPP_NO_CHAR_SB_CTOR" category="CORRECTNESS" />
@@ -422,14 +424,21 @@
<BugPattern abbrev="UTAO" type="UTAO_JUNIT_ASSERTION_ODDITIES_BOOLEAN_ASSERT" category="STYLE" />
<BugPattern abbrev="UTAO" type="UTAO_JUNIT_ASSERTION_ODDITIES_IMPOSSIBLE_NULL" category="CORRECTNESS" />
<BugPattern abbrev="UTAO" type="UTAO_JUNIT_ASSERTION_ODDITIES_ASSERT_USED" category="CORRECTNESS" />
+ <BugPattern abbrev="UTAO" type="UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NULL" category="CORRECTNESS" />
+ <BugPattern abbrev="UTAO" type="UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL" category="CORRECTNESS" />
<BugPattern abbrev="UTAO" type="UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_EQUALS" category="CORRECTNESS" />
+ <BugPattern abbrev="UTAO" type="UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_EQUALS" category="CORRECTNESS" />
<BugPattern abbrev="UTAO" type="UTAO_JUNIT_ASSERTION_ODDITIES_NO_ASSERT" category="CORRECTNESS" />
+ <BugPattern abbrev="UTAO" type="UTAO_JUNIT_ASSERTION_ODDITIES_USING_DEPRECATED" category="CORRECTNESS" />
<BugPattern abbrev="UTAO" type="UTAO_TESTNG_ASSERTION_ODDITIES_ACTUAL_CONSTANT" category="STYLE" />
<BugPattern abbrev="UTAO" type="UTAO_TESTNG_ASSERTION_ODDITIES_INEXACT_DOUBLE" category="STYLE" />
<BugPattern abbrev="UTAO" type="UTAO_TESTNG_ASSERTION_ODDITIES_BOOLEAN_ASSERT" category="STYLE" />
<BugPattern abbrev="UTAO" type="UTAO_TESTNG_ASSERTION_ODDITIES_IMPOSSIBLE_NULL" category="CORRECTNESS" />
<BugPattern abbrev="UTAO" type="UTAO_TESTNG_ASSERTION_ODDITIES_ASSERT_USED" category="CORRECTNESS" />
+ <BugPattern abbrev="UTAO" type="UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NULL" category="CORRECTNESS" />
+ <BugPattern abbrev="UTAO" type="UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL" category="CORRECTNESS" />
<BugPattern abbrev="UTAO" type="UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_EQUALS" category="CORRECTNESS" />
+ <BugPattern abbrev="UTAO" type="UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NOT_EQUALS" category="CORRECTNESS" />
<BugPattern abbrev="UTAO" type="UTAO_TESTNG_ASSERTION_ODDITIES_NO_ASSERT" category="CORRECTNESS" />
<BugPattern abbrev="SCA" type="SCA_SUSPICIOUS_CLONE_ALGORITHM" category="CORRECTNESS" />
<BugPattern abbrev="WEM" type="WEM_WEAK_EXCEPTION_MESSAGING" category="STYLE" />
@@ -449,7 +458,6 @@
<BugPattern abbrev="BED" type="BED_HIERARCHICAL_EXCEPTION_DECLARATION" category="CORRECTNESS" />
<BugPattern abbrev="UNNC" type="UNNC_UNNECESSARY_NEW_NULL_CHECK" category="CORRECTNESS" />
<BugPattern abbrev="DTEP" type="DTEP_DEPRECATED_TYPESAFE_ENUM_PATTERN" category="STYLE" />
- <BugPattern abbrev="SMA" type="SMA_STUTTERED_METHOD_ARGUMENTS" category="STYLE" />
<BugPattern abbrev="TBP" type="TBP_TRISTATE_BOOLEAN_PATTERN" category="STYLE" />
<BugPattern abbrev="SUA" type="SUA_SUSPICIOUS_UNINITIALIZED_ARRAY" category="CORRECTNESS" />
<BugPattern abbrev="ITU" type="ITU_INAPPROPRIATE_TOSTRING_USE" category="CORRECTNESS" />
@@ -522,9 +530,17 @@
<BugPattern abbrev="CSI" type="CSI_CHAR_SET_ISSUES_UNKNOWN_ENCODING" category="CORRECTNESS"/>
<BugPattern abbrev="CBC" type="CBC_CONTAINS_BASED_CONDITIONAL" category="STYLE"/>
<BugPattern abbrev="OPM" type="OPM_OVERLY_PERMISSIVE_METHOD" category="STYLE" experimental="true" />
- <BugPattern abbrev="CIS" type="CIS_STRING_PARSING_A_FIELD" category="STYLE" experimental="true" />
- <BugPattern abbrev="CIS" type="CIS_TOSTRING_STORED_IN_FIELD" category="STYLE" experimental="true" />
+ <BugPattern abbrev="STT" type="STT_STRING_PARSING_A_FIELD" category="STYLE" experimental="true" />
+ <BugPattern abbrev="STT" type="STT_TOSTRING_STORED_IN_FIELD" category="STYLE" experimental="true" />
<BugPattern abbrev="SLS" type="SLS_SUSPICIOUS_LOOP_SEARCH" category="CORRECTNESS" />
<BugPattern abbrev="CRF" type="CRF_CONFLATING_RESOURCES_AND_FILES" category="CORRECTNESS" />
+ <BugPattern abbrev="IMC" type="IMC_IMMATURE_CLASS_NO_EQUALS" category="STYLE" />
+ <BugPattern abbrev="IMC" type="IMC_IMMATURE_CLASS_NO_HASHCODE" category="STYLE" />
+ <BugPattern abbrev="IMC" type="IMC_IMMATURE_CLASS_NO_PACKAGE" category="STYLE" />
+ <BugPattern abbrev="IMC" type="IMC_IMMATURE_CLASS_NO_TOSTRING" category="STYLE" />
+ <BugPattern abbrev="JXI" type="JXI_GET_ENDPOINT_CONSUMES_CONTENT" category="CORRECTNESS" />
+ <BugPattern abbrev="JXI" type="JXI_INVALID_CONTEXT_PARAMETER_TYPE" category="CORRECTNESS" />
+ <BugPattern abbrev="JXI" type="JXI_PARM_PARAM_NOT_FOUND_IN_PATH" category="CORRECTNESS" />
+ <BugPattern abbrev="JXI" type="JXI_UNDEFINED_PARAMETER_SOURCE_IN_ENDPOINT" category="CORRECTNESS" />
</FindbugsPlugin>
Modified: trunk/fb-contrib/etc/messages.xml
===================================================================
--- trunk/fb-contrib/etc/messages.xml 2015-08-22 22:14:18 UTC (rev 1782)
+++ trunk/fb-contrib/etc/messages.xml 2015-11-25 21:51:59 UTC (rev 1783)
@@ -107,7 +107,7 @@
</Details>
</Detector>
- <Detector class="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException">
+ <Detector class="com.mebigfatguy.fbcontrib.detect.RuntimeExceptionDeclared">
<Details>
<![CDATA[
<p>Looks for methods that declare RuntimeExceptions in their throws clause. While doing
@@ -182,15 +182,8 @@
<Detector class="com.mebigfatguy.fbcontrib.detect.FinalParameters">
<Details>
<![CDATA[
- <p>Looks for methods that correctly do not write to a parameter. To help document this, and to perhaps
- help the JVM optimize the invocation of this method, you should consider defining these parameters
- as final.</p>
-
- <p>Performance gains are debatable as "the final keyword does not appear in the class file for
- local variables and parameters, thus it cannot impact the runtime performance. It's only use
- is to clarify the coders intent that the variable not be changed (which many consider dubious
- reason for its usage), and dealing with anonymous inner classes." - http://stackoverflow.com/a/266981/1447621</p>
-
+ <p>Looks for methods that correctly do not write to a parameter. To help document this you should consider
+ defining these parameters as final.</p>
<p>It is a slow detector.</p>
]]>
</Details>
@@ -978,17 +971,6 @@
</Details>
</Detector>
- <Detector class="com.mebigfatguy.fbcontrib.detect.StutteredMethodArguments">
- <Details> experimental="true"
- <![CDATA[
- <p>Looks for method calls that pass the same value for two separate parameters, where
- those arguments are not constants. Often this is a cut/paste mistake, but if not, it is
- confusing why you would pass the same value for two arguments.</p>
- <p>It is a fast detector.</p>
- ]]>
- </Details>
- </Detector>
-
<Detector class="com.mebigfatguy.fbcontrib.detect.TristateBooleanPattern">
<Details>
<![CDATA[
@@ -1508,7 +1490,7 @@
</Details>
</Detector>
- <Detector class="com.mebigfatguy.fbcontrib.detect.ClassImpersonatingString">
+ <Detector class="com.mebigfatguy.fbcontrib.detect.StringifiedTypes">
<Details>
<![CDATA[
<p>Looks for classes that store fields that are Strings that impersonate instances of classes, or collections that are
@@ -1546,6 +1528,28 @@
]]>
</Details>
</Detector>
+
+ <Detector class="com.mebigfatguy.fbcontrib.detect.ImmatureClass">
+ <Details>
+ <![CDATA[
+ <p>Looks for classes that are not fully complete from a usability point of view. Making them more difficult to use
+ than should be. Things such as
+ <UL>
+ <LI>Missing toString() method</LI>
+ </UL>
+ </p>
+ <p>It is a moderately fast detector</p>
+ ]]>
+ </Details>
+ </Detector>
+
+ <Detector class="com.mebigfatguy.fbcontrib.detect.JAXRSIssues">
+ <Details>
+ <![CDATA[
+ <p>Looks for problems with the use of the JAX-RS specification.</p>
+ ]]>
+ </Details>
+ </Detector>
<Detector class="com.mebigfatguy.fbcontrib.debug.OCSDebugger">
<Details></Details>
@@ -2783,14 +2787,14 @@
</Details>
</BugPattern>
- <BugPattern type="SC_SUSPICIOUS_COMPARATOR_RETURN_VALUES">
+ <BugPattern type="SCRV_SUSPICIOUS_COMPARATOR_RETURN_VALUES">
<ShortDescription>Comparator method doesn't seem to return all ordering values</ShortDescription>
<LongDescription>Comparator method {1} doesn't seem to return all ordering values</LongDescription>
<Details>
<![CDATA[
<p>This compareTo or compare method returns constant values for to represent less than,
- equals and greater than. However it does not return each type. Given that comparators
- are transitive, this seems incorrect.</p>
+ equals and greater than. However it does not return each type, or it unconditionally returns a non zero value.
+ Given that comparators are transitive, this seems incorrect.</p>
]]>
</Details>
</BugPattern>
@@ -3500,18 +3504,52 @@
</Details>
</BugPattern>
+ <BugPattern type="UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NULL">
+ <ShortDescription>Junit test method passes null Assert.assertEquals</ShortDescription>
+ <LongDescription>Junit test method {1} passes null to Assert.assertEquals</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This method compares an object's equality to null. It is better to use the Assert.assertNull
+ method so that the junit failure method is more meaningful of the intended test.</p>
+ ]]>
+ </Details>
+ </BugPattern>
+
+ <BugPattern type="UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL">
+ <ShortDescription>Junit test method passes null Assert.assertNotEquals</ShortDescription>
+ <LongDescription>Junit test method {1} passes null to Assert.assertNotEquals</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This method compares an object's inequality to null. It is better to use the Assert.assertNotNull
+ method so that the junit failure method is more meaningful of the intended test.</p>
+ ]]>
+ </Details>
+ </BugPattern>
+
<BugPattern type="UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_EQUALS">
- <ShortDescription>Junit test method passes boolean expression to Assert.assertTrue</ShortDescription>
- <LongDescription>Junit test method {1} passes boolean expression to Assert.assertTrue</LongDescription>
+ <ShortDescription>Junit test method passes boolean expression to Assert.assertFalse / Assert.assertTrue</ShortDescription>
+ <LongDescription>Junit test method {1} passes boolean expression to Assert.assertFalse / Assert.assertTrue</LongDescription>
<Details>
<![CDATA[
- <p>This method evaluates a boolean expression and passes that to Assert.assertTrue. It is better
- to pass the two values that are being equated to the Assert.assertEquals method so that the
+ <p>This method evaluates a boolean expression and passes that to Assert.assertFalse / Assert.assertTrue.
+ It is better to pass the two values that are being equated to the Assert.assertEquals method so that the
junit failure method is more meaningful of the intended test.</p>
]]>
</Details>
</BugPattern>
+ <BugPattern type="UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_EQUALS">
+ <ShortDescription>Junit test method passes boolean expression to Assert.assertFalse / Assert.assertTrue</ShortDescription>
+ <LongDescription>Junit test method {1} passes boolean expression to Assert.assertFalse / Assert.assertTrue</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This method evaluates a boolean expression and passes that to Assert.assertFalse / Assert.assertTrue.
+ It is better to pass the two values that are being equated to the Assert.assertNotEquals method so that the
+ junit failure method is more meaningful of the intended test.</p>
+ ]]>
+ </Details>
+ </BugPattern>
+
<BugPattern type="UTAO_JUNIT_ASSERTION_ODDITIES_NO_ASSERT">
<ShortDescription>Junit test method appears to have no assertions</ShortDescription>
<LongDescription>Junit test method {1} appears to have no assertions</LongDescription>
@@ -3525,9 +3563,20 @@
</Details>
</BugPattern>
+ <BugPattern type="UTAO_JUNIT_ASSERTION_ODDITIES_USING_DEPRECATED">
+ <ShortDescription>JUnit 4 test using deprecated junit.framework.* classes</ShortDescription>
+ <LongDescription>JUnit 4 test {1} using deprecated junit.framework.* classes</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This JUnit 4 test is still using classes from the junit.framework.* package. You should switch them
+ over to the corresponding org.junit.* set of classes, instead</p>
+ ]]>
+ </Details>
+ </BugPattern>
+
<BugPattern type="UTAO_TESTNG_ASSERTION_ODDITIES_ACTUAL_CONSTANT">
<ShortDescription>TestNG test method passes constant to first (actual) assertion parameter</ShortDescription>
- <LongDescription>TestNG test method {1} passes constant to forst (actual) assertion parameter</LongDescription>
+ <LongDescription>TestNG test method {1} passes constant to first (actual) assertion parameter</LongDescription>
<Details>
<![CDATA[
<p>This method calls assert passing a constant value as the first of the two values. The assert
@@ -3583,18 +3632,52 @@
</Details>
</BugPattern>
+ <BugPattern type="UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NULL">
+ <ShortDescription>TestNG test method passes null Assert.assertEquals</ShortDescription>
+ <LongDescription>TestNG test method {1} passes null to Assert.assertEquals</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This method compares an object's equality to null. It is better to use the Assert.assertNull
+ method so that the TestNG failure method is more meaningful of the intended test.</p>
+ ]]>
+ </Details>
+ </BugPattern>
+
+ <BugPattern type="UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL">
+ <ShortDescription>TestNG test method passes null Assert.assertNotEquals</ShortDescription>
+ <LongDescription>TestNG test method {1} passes null to Assert.assertNotEquals</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This method compares an object's inequality to null. It is better to use the Assert.assertNotNull
+ method so that the TestNG failure method is more meaningful of the intended test.</p>
+ ]]>
+ </Details>
+ </BugPattern>
+
<BugPattern type="UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_EQUALS">
- <ShortDescription>TestNG test method passes boolean expression to Assert.assertTrue</ShortDescription>
- <LongDescription>TestNG test method {1} passes boolean expression to Assert.assertTrue</LongDescription>
+ <ShortDescription>TestNG test method passes boolean expression to Assert.assertFalse / Assert.assertTrue</ShortDescription>
+ <LongDescription>TestNG test method {1} passes boolean expression to Assert.assertFalse / Assert.assertTrue</LongDescription>
<Details>
<![CDATA[
- <p>This method evaluates a boolean expression and passes that to Assert.assertTrue. It is better
- to pass the two values that are being equated to the Assert.assertEquals method so that the
+ <p>This method evaluates a boolean expression and passes that to Assert.assertFalse / Assert.assertTrue.
+ It is better to pass the two values that are being equated to the Assert.assertEquals method so that the
TestNG failure method is more meaningful of the intended test.</p>
]]>
</Details>
</BugPattern>
+ <BugPattern type="UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NOT_EQUALS">
+ <ShortDescription>TestNG test method passes boolean expression to Assert.assertFalse / Assert.assertTrue</ShortDescription>
+ <LongDescription>TestNG test method {1} passes boolean expression to Assert.assertFalse / Assert.assertTrue</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This method evaluates a boolean expression and passes that to Assert.assertFalse / Assert.assertTrue.
+ It is better to pass the two values that are being equated to the Assert.assertNotEquals method so that the
+ TestNG failure method is more meaningful of the intended test.</p>
+ ]]>
+ </Details>
+ </BugPattern>
+
<BugPattern type="UTAO_TESTNG_ASSERTION_ODDITIES_NO_ASSERT">
<ShortDescription>TestNG test method appears to have no assertions</ShortDescription>
<LongDescription>TestNG test method {1} appears to have no assertions</LongDescription>
@@ -3844,19 +3927,6 @@
</Details>
</BugPattern>
- <BugPattern type="SMA_STUTTERED_METHOD_ARGUMENTS">
- <ShortDescription>Code calls a method passing the same value to two different arguments</ShortDescription>
- <LongDescription>Code {1} calls a method passing the same value to two different arguments</LongDescription>
- <Details>
- <![CDATA[
- <p>This method calls a method passing the same value for two or more of the parameters.
- Often this is a cut/paste bug, but if not, it is confusing why you would pass the same value for two
- different parameters. Perhaps an alternative method that just takes one parameter should be overridden
- in this case.</p>
- ]]>
- </Details>
- </BugPattern>
-
<BugPattern type="TBP_TRISTATE_BOOLEAN_PATTERN">
<ShortDescription>Method returns null for Boolean type</ShortDescription>
<LongDescription>Method {1} returns null for Boolean type</LongDescription>
@@ -4868,7 +4938,7 @@
</Details>
</BugPattern>
- <BugPattern type="CIS_TOSTRING_STORED_IN_FIELD">
+ <BugPattern type="STT_TOSTRING_STORED_IN_FIELD">
<ShortDescription>This method stores the value of a toString() call into a field</ShortDescription>
<LongDescription>This method {0} stores the value of a toString() call into a field</LongDescription>
<Details>
@@ -4882,7 +4952,7 @@
</Details>
</BugPattern>
- <BugPattern type="CIS_STRING_PARSING_A_FIELD">
+ <BugPattern type="STT_STRING_PARSING_A_FIELD">
<ShortDescription>This method parses a String that is a field</ShortDescription>
<LongDescription>This method {1} parses a String that is a field</LongDescription>
<Details>
@@ -4921,6 +4991,119 @@
</Details>
</BugPattern>
+ <BugPattern type="IMC_IMMATURE_CLASS_NO_EQUALS">
+ <ShortDescription>Class does not implement an equals method</ShortDescription>
+ <LongDescription>Class {0} does not implement an equals method</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This class which has instance fields has no equals(Object o) method, It is possible that this
+ class is never used in a context where this is required, it is often assumed, however, from clients
+ of this class that it is, so it is good to add such methods when you create them.
+ </p>
+ ]]>
+ </Details>
+ </BugPattern>
+
+ <BugPattern type="IMC_IMMATURE_CLASS_NO_HASHCODE">
+ <ShortDescription>Class does not implement a hashCode method</ShortDescription>
+ <LongDescription>Class {0} does not implement a hashCode method</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This class which has instance fields has no hashCode() method, It is possible that this
+ class is never used in a context where this is required, it is often assumed, however, from clients
+ of this class that it is, so it is good to add such methods when you create them.
+ </p>
+ ]]>
+ </Details>
+ </BugPattern>
+
+ <BugPattern type="IMC_IMMATURE_CLASS_NO_PACKAGE">
+ <ShortDescription>Class is defined in the default package</ShortDescription>
+ <LongDescription>Class {0} id defined in the default package</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This class has been created in the default package. Classes should be defined in a
+ proper package structure, typically defined by the reverse of the domain name of the
+ owner of the code base. Putting code in the default (no) package limits it usefulness, and
+ leaves it open to name collisions.
+ </p>
+ ]]>
+ </Details>
+ </BugPattern>
+
+ <BugPattern type="IMC_IMMATURE_CLASS_NO_TOSTRING">
+ <ShortDescription>Class does not implement a toString method</ShortDescription>
+ <LongDescription>Class {0} does not implement a toString method</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This class which has instance fields has no toString() method, which will make debugging with this
+ class more difficult than it could be. Consider adding a method. Using libraries like commons-lang3
+ ToStringBuilder makes this process easy.
+ </p>
+ ]]>
+ </Details>
+ </BugPattern>
+
+ <BugPattern type="JXI_GET_ENDPOINT_CONSUMES_CONTENT">
+ <ShortDescription>JAX-RS Method implements a GET request but consumes input</ShortDescription>
+ <LongDescription>JAX-RS Method {1} implements a GET request but consumes input</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This JAX-RS endpoint is annotated to be used as @GET requests, but also documents that it
+ consumes JSON or XML data. Since a get request pulls parameters from the url, and not
+ the body of request, this pattern is problematic. If you wish to consume JSON or XML data,
+ this request should be annotated with @POST.
+ ]]>
+ </Details>
+ </BugPattern>
+
+ <BugPattern type="JXI_INVALID_CONTEXT_PARAMETER_TYPE">
+ <ShortDescription>JAX-RS Method specifies an invalid @Context parameter type</ShortDescription>
+ <LongDescription>JAX-RS {1} Method specifies an invalid @Context parameter type</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This JAX-RS endpoint annotates a parameter with a @Context annotation. This annotation can supply values
+ for the following types:
+ <ul>
+ <li>javax.ws.rs.core.UriInfo</li>
+ <li>javax.ws.rs.core.HttpHeaders</li>
+ <li>javax.ws.rs.core.Request</li>
+ <li>javax.ws.rs.core.SecurityContext</li>
+ <li>javax.ws.rs.ext.Providers</li>
+ <li>javax.servlet.ServletConfig</li>
+ <li>javax.servlet.ServletContext</li>
+ <li>javax.servlet.HttpServletRequest</li>
+ <li>javax.servlet.HttpServletResponse</li>
+ </ul>
+ It is possible that your container can supply additional types, but these types are not standard are may
+ not be supported on other application servers.</p>
+ ]]>
+ </Details>
+ </BugPattern>
+
+ <BugPattern type="JXI_PARM_PARAM_NOT_FOUND_IN_PATH">
+ <ShortDescription>JAX-RS Method specifies non-resolveable @PathParam</ShortDescription>
+ <LongDescription>JAX-RS Method {1} specifies non-resolveable @PathParam</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This JAX-RS endpoint has a @PathParam specified that is not found in the @Path annotation
+ and thus can not determine from where to populate that parameter.</p>
+ ]]>
+ </Details>
+ </BugPattern>
+
+ <BugPattern type="JXI_UNDEFINED_PARAMETER_SOURCE_IN_ENDPOINT">
+ <ShortDescription>JAX-RS Method defines a parameter that has no @*Param or @Context annotation, or @Consumes method annotation</ShortDescription>
+ <LongDescription>JAX-RS Method {1} defines a parameter that has no @*Param or @Context annotation, or @Consumes method annotation</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This JAX-RS endpoint declares parameters without specifying where the value of this parameter comes from.
+ You can specify this by using one of several 'Param' annotations (@PathParam, @CookieParam, @FormParam @HeaderParam @MatrixParam @QueryParam),
+ by adding a @Context parameter annotation, or you can declare that the method @Consumes an xml or json stream.
+ ]]>
+ </Details>
+ </BugPattern>
+
<!-- BugCode -->
<BugCode abbrev="ISB">Inefficient String Buffering</BugCode>
@@ -5001,7 +5184,6 @@
<BugCode abbrev="BED">Bogus Exception Declaration</BugCode>
<BugCode abbrev="UNNC">Unnecessary New Null Check</BugCode>
<BugCode abbrev="DTEP">Deprecated Typesafe Enum Pattern</BugCode>
- <BugCode abbrev="SMA">Stuttered Method Arguments</BugCode>
<BugCode abbrev="TBP">Tristate Boolean Pattern</BugCode>
<BugCode abbrev="SUA">Suspicious Uninitialized Array</BugCode>
<BugCode abbrev="ITU">Inappropriate toString Use</BugCode>
@@ -5047,7 +5229,9 @@
<BugCode abbrev="CSI">Charset Issues</BugCode>
<BugCode abbrev="CBC">Contains Based Conditional</BugCode>
<BugCode abbrev="OPM">Overly Permissive Method</BugCode>
- <BugCode abbrev="CIS">Class Impersonating String</BugCode>
+ <BugCode abbrev="STT">Stringified Types</BugCode>
<BugCode abbrev="SLS">Suspicious Loop Search</BugCode>
<BugCode abbrev="CRF">Conflating Resources And Files</BugCode>
+ <BugCode abbrev="IMC">Immature Class</BugCode>
+ <BugCode abbrev="JXI">JAX-RS Issues</BugCode>
</MessageCollection>
Modified: trunk/fb-contrib/htdocs/index.shtml
===================================================================
--- trunk/fb-contrib/htdocs/index.shtml 2015-08-22 22:14:18 UTC (rev 1782)
+++ trunk/fb-contrib/htdocs/index.shtml 2015-11-25 21:51:59 UTC (rev 1783)
@@ -68,7 +68,7 @@
</li>
</ul>
</p>
- <p style="font-weight: bold;">The latest version of fb-contrib is 6.2.2 available for download
+ <p style="font-weight: bold;">The latest version of fb-contrib is 6.2.3 available for download
<a href="http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22fb-contrib%22">here</a>.</p>
<p style="font-weight: bold;">This version requires FindBugs 3.0.1 or better</p>
<p style="font-weight: bold;">Please note that active development for this project is now done on
@@ -90,10 +90,14 @@
Looks for methods that are declared more permissively than the code is using. For instance, declaring
a method public, when it could just be declared private.
</li>
- <li><b>[CIS] Class Impersonating String</b><br/>
+ <li><b>[STT] Stringified Types</b><br/>
Looks for string fields that appear to be built with parsing or calling
toString() on another object, or from objects that are fields.
</li>
+ <li><b>[IMC] Immature Class</b><br/>
+ Looks for classes that are not fully implemented to be a well rounded class. While
+ the class will likely work fine, it is more difficult to use or understand than necessary.
+ </li>
</ul>
</div>
<hr/>
Modified: trunk/fb-contrib/htdocs/repository.html
===================================================================
--- trunk/fb-contrib/htdocs/repository.html 2015-08-22 22:14:18 UTC (rev 1782)
+++ trunk/fb-contrib/htdocs/repository.html 2015-11-25 21:51:59 UTC (rev 1783)
@@ -22,7 +22,7 @@
<table style="margin-left: 40px; background-color: #A0A0FF; padding: 20px; border-width: 1px; border-style: outset; border-color: #000000;">
<tr><td><b>GroupId:</b></td><td>com.mebigfatguy.fb-contrib</td></tr>
<tr><td><b>ArtifactId:</b></td><td>fb-contrib</td></tr>
- <tr><td><b>Version:</b></td><td>6.2.2</td></tr>
+ <tr><td><b>Version:</b></td><td>6.2.3</td></tr>
</table>
</div>
Modified: trunk/fb-contrib/pom.xml
===================================================================
--- trunk/fb-contrib/pom.xml 2015-08-22 22:14:18 UTC (rev 1782)
+++ trunk/fb-contrib/pom.xml 2015-11-25 21:51:59 UTC (rev 1783)
@@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.mebigfatguy.fb-contrib</groupId>
<artifactId>fb-contrib</artifactId>
- <version>6.3.0</version>
+ <version>6.3.0-SNAPSHOT</version>
<prerequisites>
<maven>2.2.1</maven>
@@ -72,6 +72,7 @@
</contributor>
<contributor>
<name>Juan Martín Sotuyo Dodero</name>
+ <email>jua...@gm...</email>
</contributor>
</contributors>
@@ -160,44 +161,14 @@
<pluginManagement>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clean-plugin</artifactId>
- <version>2.5</version>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>buildnumber-maven-plugin</artifactId>
- <version>1.3</version>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
+ <plugin><artifactId>maven-clean-plugin</artifactId><version>2.6.1</version></plugin>
+ <plugin><groupId>org.codehaus.mojo</groupId><artifactId>buildnumber-maven-plugin</artifactId><version>1.3</version></plugin>
+ <plugin><groupId>org.codehaus.mojo</groupId><artifactId>findbugs-maven-plugin</artifactId><version>2.5.5</version></plugin>
+ <plugin><artifactId>maven-compiler-plugin</artifactId><version>3.1</version></plugin>
+ <plugin><artifactId>maven-deploy-plugin</artifactId><version>2.8.2</version></plugin>
+ <plugin><artifactId>maven-install-plugin</artifactId><version>2.5.2</version></plugin>
+ <plugin><artifactId>maven-jar-plugin</artifactId><version>2.6</version>
<configuration>
- <compilerArgument>-Xlint</compilerArgument>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <version>2.8.1</version>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-install-plugin</artifactId>
- <version>2.5.1</version>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.5</version>
- <configuration>
<archive>
<manifestEntries>
<fb-contrib-version>${project.version}</fb-contrib-version>
@@ -218,43 +189,17 @@
</archive>
</configuration>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.7</version>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <version>3.3</version>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>2.2.1</version>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.17</version>
- </plugin>
+ <plugin><artifactId>maven-project-info-reports-plugin</artifactId><version>2.7</version></plugin>
+ <plugin><artifactId>maven-resources-plugin</artifactId><version>2.7</version></plugin>
+ <plugin><artifactId>maven-site-plugin</artifactId><version>3.4</version></plugin>
+ <plugin><artifactId>maven-source-plugin</artifactId><version>2.2.1</version></plugin>
+ <plugin><artifactId>maven-surefire-plugin</artifactId><version>2.18.1</version></plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>buildnumber-maven-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId><artifactId>buildnumber-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
@@ -266,11 +211,26 @@
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
+ <groupId>org.codehaus.mojo</groupId><artifactId>findbugs-maven-plugin</artifactId>
+ <dependencies>
+ <dependency><groupId>com.google.code.findbugs</groupId><artifactId>findbugs</artifactId><version>3.0.1</version></dependency>
+ </dependencies>
+ <configuration>
+ <effort>Max</effort>
+ </configuration>
+ <executions>
+ <execution>
+ <goals><goal>check</goal></goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.6</source>
- <target>1.6</target>
+ <compilerArgument>-Xlint</compilerArgument>
+ <source>1.7</source>
+ <target>1.7</target>
</configuration>
</plugin>
</plugins>
Modified: trunk/fb-contrib/samples/AWCBR_Sample.java
===================================================================
--- trunk/fb-contrib/samples/AWCBR_Sample.java 2015-08-22 22:14:18 UTC (rev 1782)
+++ trunk/fb-contrib/samples/AWCBR_Sample.java 2015-11-25 21:51:59 UTC (rev 1783)
@@ -1,3 +1,7 @@
+import java.lang.reflect.Method;
+import java.util.HashSet;
+import java.util.Set;
+
public class AWCBR_Sample {
public void m(int[] v) {
v[0]++;
@@ -24,4 +28,15 @@
i = data[0];
return i;
}
+
+ public boolean testFPInvoke(Method m) throws Exception {
+
+ Set<String> s = new HashSet<String>();
+ Object[] args = new Object[] { s };
+ m.invoke(this, args);
+
+ s = (Set<String>) args[0];
+
+ return s.isEmpty();
+ }
}
Deleted: trunk/fb-contrib/samples/CIS_Sample.java
===================================================================
--- trunk/fb-contrib/samples/CIS_Sample.java 2015-08-22 22:14:18 UTC (rev 1782)
+++ trunk/fb-contrib/samples/CIS_Sample.java 2015-11-25 21:51:59 UTC (rev 1783)
@@ -1,40 +0,0 @@
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-public class CIS_Sample {
-
- enum Sample {
- Hi, Lo
- };
-
- Map<String, Object> map = new HashMap<String, Object>();
-
- String val;
-
- public void testToStringToField() {
- val = Sample.Hi.toString();
- }
-
- public void testSBWithToStringToField(Date d, Integer i) {
- StringBuilder s = new StringBuilder();
- s.append(d);
- s.append(i);
- val = s.toString();
- }
-
- public Object testSBToMapField(Date d1, Date d2) {
- map.put("a-v", d1 + ":" + d2);
- return map.get(d1 + "-" + d2);
- }
-
- public String testParseOfMapResult() {
- String s = (String) map.get("foo");
- int colonPos = s.indexOf(":");
- return s.substring(0, colonPos);
- }
-
- public void fpTestToStringToFieldSB(String s) {
- val = s + "wow";
- }
-}
Added: trunk/fb-contrib/samples/IMC_Sample.java
===================================================================
--- trunk/fb-contrib/samples/IMC_Sample.java (rev 0)
+++ trunk/fb-contrib/samples/IMC_Sample.java 2015-11-25 21:51:59 UTC (rev 1783)
@@ -0,0 +1,35 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+public class IMC_Sample {
+
+ private String reportMe;
+
+ @SuperSecret
+ class FPClassIMC {
+ private String dontReportMe;
+ }
+
+ class FPFieldIMC {
+ @SuperSecret
+ private String dontReportMe;
+ }
+}
+
+class IMCFPHasAToString {
+ @SuperSecret
+ private String fooo;
+
+ @Override
+ public String toString() {
+ return fooo;
+ }
+}
+
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.TYPE, ElementType.FIELD})
+@interface SuperSecret {
+}
Property changes on: trunk/fb-contrib/samples/IMC_Sample.java
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/fb-contrib/samples/JXI_Sample.java
===================================================================
--- trunk/fb-contrib/samples/JXI_Sample.java (rev 0)
+++ trunk/fb-contrib/samples/JXI_Sample.java 2015-11-25 21:51:59 UTC (rev 1783)
@@ -0,0 +1,79 @@
+import java.io.InputStream;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+@Path("/booya/{weasel}")
+public class JXI_Sample {
+
+ @GET
+ @Path("/stuff")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response loadStuff(Stuff s) {
+ return Response.ok().build();
+ }
+
+ @POST
+ @Path("/stuffit/{blub}")
+ public Response stufStuff(@PathParam("blub") String blub, Stuff s) {
+ return Response.ok().build();
+ }
+
+ @GET
+ @Path("/stuffNotRight/{good}")
+ public Response mismatchParm(@PathParam("bad") String bad) {
+ return Response.ok().build();
+ }
+
+ @PUT
+ @Path("/stuffMe")
+ public Response stuffWithBadContext(@Context InputStream is) {
+ return Response.ok().build();
+ }
+
+ @GET
+ @Path("/stuffy")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response fpFine(Stuff s) {
+ return Response.ok().build();
+ }
+
+
+ @GET
+ @Path("/stuffToClassAnnot/{good}")
+ public Response fpUseClassAnnot(@PathParam("weasel") String bad) {
+ return Response.ok().build();
+ }
+
+ @POST
+ @Path("/stuffok/{blub}")
+ public Response fpStuff(@PathParam("blub") String blub, String body) {
+ return Response.ok().build();
+ }
+
+ @POST
+ @Path("/stuffyup/{blub}")
+ @Consumes(MediaType.APPLICATION_JSON)
+ public Response fpStuff2(@PathParam("blub") String blub, Stuff body) {
+ return Response.ok().build();
+ }
+
+ @PUT
+ @Path("/stuffGoodContext")
+ public Response fpStuffGoodContext(@Context UriInfo info) {
+ return Response.ok().build();
+ }
+
+ static class Stuff {
+ }
+}
Property changes on: trunk/fb-contrib/samples/JXI_Sample.java
____________________________________________________...
[truncated message content] |