[Fb-contrib-commit] SF.net SVN: fb-contrib:[1832] trunk/fb-contrib
Brought to you by:
dbrosius
From: <dbr...@us...> - 2018-03-04 05:43:16
|
Revision: 1832 http://sourceforge.net/p/fb-contrib/code/1832 Author: dbrosius Date: 2018-03-04 05:43:03 +0000 (Sun, 04 Mar 2018) Log Message: ----------- sync from github Modified Paths: -------------- 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/src/main/java/com/mebigfatguy/fbcontrib/FBContrib.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/CollectMethodsReturningImmutableCollections.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/CollectNullableMethodStatus.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/ImmutabilityType.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/MethodInfo.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/Statistics.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/debug/Debug.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/debug/OCSDebugger.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractCollectionScanningDetector.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractOverriddenMethod.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AnnotationIssues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayBasedCollections.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayIndexOutOfBounds.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BackportReusePublicIdentifiers.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BogusExceptionDeclaration.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BuryingLogic.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CharsetIssues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CloneUsability.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CollectionNamingConfusion.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CommonsEqualsBuilderToEquals.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CommonsHashcodeBuilderToHashcode.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CommonsStringBuilderToString.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CompareClassNameEquals.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ConcurrentCollectionIssues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ConflatingResourcesAndFiles.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ConflictingTimeUnits.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ConfusingArrayAsList.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ConfusingFunctionSemantics.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ContainsBasedConditional.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ContraVariantArrayAssignment.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CustomBuiltXML.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CyclomaticComplexity.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/DateComparison.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/DeprecatedTypesafeEnumPattern.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/DubiousMapCollection.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/DubiousSetOfCollections.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ExceptionSoftening.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/FinalParameters.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/FindClassCircularDependencies.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/HangingExecutors.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/HttpClientProblems.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/IOIssues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ImproperPropertiesUse.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/InappropriateToStringUse.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/InconsistentKeyNameCasing.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/IncorrectInternalClassUse.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/InheritanceTypeChecking.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/InvalidConstantArgument.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/JAXRSIssues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/JPAIssues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/LingeringGraphicsObjects.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/LiteralStringComparison.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/LocalTypeDetector.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/LoggerOddities.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ManualArrayCopy.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/MapUsageIssues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/MethodReturnsConstant.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/MissingMethodsDetector.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ModifyingUnmodifiableCollection.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/MoreDumbMethods.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/NeedlessCustomSerialization.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/NeedlessInstanceRetrieval.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/NonCollectionMethodUse.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/NonFunctionalField.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/NonProductiveMethodCall.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/NonRecycleableTaglibs.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/NonSymmetricEquals.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/OptionalIssues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/OrphanedDOMNode.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/OverlyPermissiveMethod.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/OverzealousCasting.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ParallelLists.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/PoorMansEnum.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/PoorlyDefinedParameter.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/PossibleConstantAllocationInLoop.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/PossibleIncompleteSerialization.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/PossibleMemoryBloat.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/PossibleUnsuspectedSerialization.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/PresizeCollections.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ReflectionIssues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ReflectionOnObjectMethods.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/RuntimeExceptionDeclared.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SQLInLoop.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/Section508Compliance.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SideEffectConstructor.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SloppyClassReflection.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SluggishGui.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SpuriousThreadStates.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/StaticArrayCreatedInMethod.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/StaticMethodInstanceInvocation.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/StringifiedTypes.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuboptimalExpressionOrder.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousCloneAlgorithm.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousClusteredSessionSupport.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousGetterSetterUse.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousLoopSearch.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousNullGuard.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousShadedClassUse.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousUninitializedArray.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousWaitOnConcurrentObject.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SyncCollectionIterators.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/TailRecursion.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/TristateBooleanPattern.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UnboundMethodTemplateParameter.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UnitTestAssertionOddities.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/Unjitable.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UnnecessaryApiConversion.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UnnecessaryNewNullCheck.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UnnecessaryStoreBeforeReturn.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UnrelatedCollectionContents.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UnrelatedReturnValues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UnsynchronizedSingletonFieldWrites.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UnusedParameter.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UseAddAll.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UseCharacterParameterizedMethod.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UseEnumCollections.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UseSplit.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UseToArray.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UseTryWithResources.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UseVarArgs.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/WiringIssues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/WriteOnlyCollection.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/AttributesUtils.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/BugType.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/CodeByteUtils.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/CollectionUtils.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/FQField.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/FQMethod.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/OpcodeUtils.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/PublicAPI.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/QMethod.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/RegisterUtils.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/SignatureBuilder.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/SignatureUtils.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/StopOpcodeParsingException.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/TernaryPatcher.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/ToString.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/UnmodifiableList.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/UnmodifiableSet.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/Values.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/XClassUtils.java trunk/fb-contrib/src/samples/java/ex/AI_Sample.java trunk/fb-contrib/src/samples/java/ex/OC_Sample.java trunk/fb-contrib/src/samples/java/ex/PSC_Sample.java trunk/fb-contrib/src/samples/java/ex/SPP_Sample.java trunk/fb-contrib/src/samples/java/ex/UEC_Sample.java trunk/fb-contrib/src/samples/java/ex/UTAO_Sample.java trunk/fb-contrib/src/test/java/com/mebigfatguy/fbcontrib/utils/SignatureBuilderTest.java trunk/fb-contrib/src/test/java/com/mebigfatguy/fbcontrib/utils/SignatureUtilsTest.java Added Paths: ----------- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ListUsageIssues.java trunk/fb-contrib/src/samples/java/ex/LUI_Sample.java trunk/fb-contrib/src/samples/java/ex/MUI_Sample.java Removed Paths: ------------- trunk/fb-contrib/src/samples/java/ex/MUP_Sample.java Modified: trunk/fb-contrib/build.xml =================================================================== --- trunk/fb-contrib/build.xml 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/build.xml 2018-03-04 05:43:03 UTC (rev 1832) @@ -31,7 +31,7 @@ <property name="javac.debug" value="on" /> <property name="test_reports.dir" value="${target.dir}/reports/test"/> - <property name="fb-contrib.version" value="7.2.0" /> + <property name="fb-contrib.version" value="7.2.1" /> <property name="sonatype.dir" value="${user.home}/.fb-contrib-${fb-contrib.version}-sonatype" /> @@ -256,7 +256,7 @@ <target name="javadoc" depends="-init" description="build the javadoc for the project"> <javadoc packagenames="com.mebigfatguy.*" sourcepath="${src.dir}" classpathref="fb-contrib.classpath" destdir="${javadoc.dir}" windowtitle="fb-contrib api" access="private"> <doctitle><![CDATA[<h1>fb-contrib javadoc</h1>]]></doctitle> - <bottom><![CDATA[<i>Copyright © 2005-2017 MeBigFatGuy.com. All Rights Reserved.</i>]]></bottom> + <bottom><![CDATA[<i>Copyright © 2005-2018 MeBigFatGuy.com. All Rights Reserved.</i>]]></bottom> </javadoc> </target> Modified: trunk/fb-contrib/etc/bugrank.txt =================================================================== --- trunk/fb-contrib/etc/bugrank.txt 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/etc/bugrank.txt 2018-03-04 05:43:03 UTC (rev 1832) @@ -112,6 +112,9 @@ +0 BugPattern LO_TOSTRING_PARAMETER +2 BugPattern LSC_LITERAL_STRING_COMPARISON +0 BugPattern LSYC_LOCAL_SYNCHRONIZED_COLLECTION ++0 BugPattern LUI_USE_COLLECTION_ADD ++0 BugPattern LUI_USE_GET0 ++0 BugPattern LUI_USE_SINGLETON_LIST +2 BugPattern MAC_MANUAL_ARRAY_COPY +0 BugPattern MDM_BIGDECIMAL_EQUALS +0 BugPattern MDM_INETADDRESS_GETLOCALHOST @@ -131,7 +134,11 @@ +2 BugPattern MOM_MISLEADING_OVERLOAD_MODEL +0 BugPattern MRC_METHOD_RETURNS_CONSTANT +0 BugPattern MUC_MODIFYING_UNMODIFIABLE_COLLECTION -+0 BugPattern MUP_CONTAINSKEY_BEFORE_GET ++0 BugPattern MUI_CALLING_SIZE_ON_SUBCONTAINER ++0 BugPattern MUI_CONTAINSKEY_BEFORE_GET ++0 BugPattern MUI_GET_BEFORE_REMOVE ++0 BugPattern MUI_NULL_CHECK_ON_MAP_SUBSET_ACCESSOR ++0 BugPattern MUI_USE_CONTAINSKEY +0 BugPattern NAB_NEEDLESS_AUTOBOXING_CTOR +0 BugPattern NAB_NEEDLESS_AUTOBOXING_VALUEOF +0 BugPattern NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION @@ -168,6 +175,7 @@ +0 BugPattern PME_POOR_MANS_ENUM +0 BugPattern PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS +0 BugPattern PSC_PRESIZE_COLLECTIONS ++0 BugPattern PSC_SUBOPTIMAL_COLLECTION_SIZING +0 BugPattern PUS_POSSIBLE_UNSUSPECTED_SERIALIZATION +0 BugPattern RFI_SET_ACCESSIBLE +0 BugPattern ROOM_REFLECTION_ON_OBJECT_METHODS @@ -210,7 +218,6 @@ +0 BugPattern SPP_NON_USEFUL_TOSTRING +0 BugPattern SPP_NO_CHAR_SB_CTOR +0 BugPattern SPP_NULL_BEFORE_INSTANCEOF -+0 BugPattern SPP_NULL_CHECK_ON_MAP_SUBSET_ACCESSOR +0 BugPattern SPP_NULL_CHECK_ON_OPTIONAL +0 BugPattern SPP_SERIALVER_SHOULD_BE_PRIVATE +0 BugPattern SPP_STATIC_FORMAT_STRING @@ -224,7 +231,6 @@ +0 BugPattern SPP_USELESS_TERNARY +0 BugPattern SPP_USE_BIGDECIMAL_STRING_CTOR +0 BugPattern SPP_USE_CHARAT -+0 BugPattern SPP_USE_CONTAINSKEY +0 BugPattern SPP_USE_GET0 +0 BugPattern SPP_USE_GETPROPERTY +0 BugPattern SPP_USE_ISEMPTY Modified: trunk/fb-contrib/etc/findbugs.xml =================================================================== --- trunk/fb-contrib/etc/findbugs.xml 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/etc/findbugs.xml 2018-03-04 05:43:03 UTC (rev 1832) @@ -23,7 +23,7 @@ <!-- Detectors --> - <!-- COMMENT OUT FOR RELEASE + <!-- COMMENT OUT FOR RELEASE <Detector class="com.mebigfatguy.fbcontrib.debug.OCSDebugger" speed="fast"/> @@ -148,7 +148,7 @@ <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_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,SPP_NULL_CHECK_ON_OPTIONAL,SPP_WRONG_COMMONS_TO_STRING_OBJECT,SPP_NULL_CHECK_ON_MAP_SUBSET_ACCESSOR" /> + 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_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,SPP_NULL_CHECK_ON_OPTIONAL,SPP_WRONG_COMMONS_TO_STRING_OBJECT" /> <Detector class="com.mebigfatguy.fbcontrib.detect.SpoiledChildInterfaceImplementor" speed="fast" reports="SCII_SPOILED_CHILD_INTERFACE_IMPLEMENTOR" /> @@ -264,7 +264,7 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.ModifyingUnmodifiableCollection" speed="fast" reports="MUC_MODIFYING_UNMODIFIABLE_COLLECTION"/> - <Detector class="com.mebigfatguy.fbcontrib.detect.PresizeCollections" speed="fast" reports="PSC_PRESIZE_COLLECTIONS" /> + <Detector class="com.mebigfatguy.fbcontrib.detect.PresizeCollections" speed="fast" reports="PSC_PRESIZE_COLLECTIONS,PSC_SUBOPTIMAL_COLLECTION_SIZING" /> <Detector class="com.mebigfatguy.fbcontrib.detect.ArrayIndexOutOfBounds" speed="fast" reports="AIOB_ARRAY_INDEX_OUT_OF_BOUNDS,AIOB_ARRAY_STORE_TO_NULL_REFERENCE" /> @@ -322,14 +322,17 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.AnnotationIssues" speed="fast" reports="AI_ANNOTATION_ISSUES_NEEDS_NULLABLE"/> - <Detector class="com.mebigfatguy.fbcontrib.detect.MapUsageIssues" speed="fast" reports="MUP_CONTAINSKEY_BEFORE_GET"/> + <Detector class="com.mebigfatguy.fbcontrib.detect.MapUsageIssues" speed="fast" reports="MUI_CONTAINSKEY_BEFORE_GET,MUI_GET_BEFORE_REMOVE,MUI_CALLING_SIZE_ON_SUBCONTAINER,MUI_NULL_CHECK_ON_MAP_SUBSET_ACCESSOR,MUI_USE_CONTAINSKEY"/> <Detector class="com.mebigfatguy.fbcontrib.collect.CollectNullableMethodStatus" speed="fast" reports="" hidden="true" /> - <!-- COMMENT OUT FOR POINT RELEASE --> - <!-- COMMENT OUT FOR POINT RELEASE --> + <!-- COMMENT OUT FOR POINT RELEASE + <Detector class="com.mebigfatguy.fbcontrib.detect.ListUsageIssues" speed="fast" reports="LUI_USE_SINGLETON_LIST,LUI_USE_COLLECTION_ADD,LUI_USE_GET0"/> + + COMMENT OUT FOR POINT RELEASE --> + <!-- BugPattern --> <BugPattern abbrev="ISB" type="ISB_INEFFICIENT_STRING_BUFFERING" category="PERFORMANCE" /> @@ -422,7 +425,6 @@ <BugPattern abbrev="SPP" type="SPP_SUSPECT_STRING_TEST" category="CORRECTNESS" /> <BugPattern abbrev="SPP" type="SPP_USE_STRINGBUILDER_LENGTH" category="PERFORMANCE" /> <BugPattern abbrev="SPP" type="SPP_INVALID_CALENDAR_COMPARE" category="CORRECTNESS" /> - <BugPattern abbrev="SPP" type="SPP_USE_CONTAINSKEY" category="STYLE" /> <BugPattern abbrev="SPP" type="SPP_USE_ISEMPTY" category="STYLE" /> <BugPattern abbrev="SPP" type="SPP_USE_GETPROPERTY" category="STYLE" /> <BugPattern abbrev="SPP" type="SPP_USELESS_CASING" category="PERFORMANCE" /> @@ -441,7 +443,6 @@ <BugPattern abbrev="SPP" type="SPP_STATIC_FORMAT_STRING" category="CORRECTNESS" /> <BugPattern abbrev="SPP" type="SPP_NULL_CHECK_ON_OPTIONAL" category="CORRECTNESS" /> <BugPattern abbrev="SPP" type="SPP_WRONG_COMMONS_TO_STRING_OBJECT" category="CORRECTNESS" /> - <BugPattern abbrev="SPP" type="SPP_NULL_CHECK_ON_MAP_SUBSET_ACCESSOR" category="CORRECTNESS" /> <BugPattern abbrev="BAS" type="BAS_BLOATED_ASSIGNMENT_SCOPE" category="PERFORMANCE" /> <BugPattern abbrev="SCII" type="SCII_SPOILED_CHILD_INTERFACE_IMPLEMENTOR" category="STYLE" /> <BugPattern abbrev="DWI" type="DWI_DELETING_WHILE_ITERATING" category="CORRECTNESS" /> @@ -550,6 +551,7 @@ <BugPattern abbrev="CU" type="CU_CLONE_USABILITY_THROWS" category="STYLE" /> <BugPattern abbrev="CAAL" type="CAAL_CONFUSING_ARRAY_AS_LIST" category="CORRECTNESS" /> <BugPattern abbrev="PSC" type="PSC_PRESIZE_COLLECTIONS" category="PERFORMANCE" /> + <BugPattern abbrev="PSC" type="PSC_SUBOPTIMAL_COLLECTION_SIZING" category="PERFORMANCE" /> <BugPattern abbrev="UMTP" type="UMTP_UNBOUND_METHOD_TEMPLATE_PARAMETER" category="CORRECTNESS" /> <BugPattern abbrev="NPMC" type="NPMC_NON_PRODUCTIVE_METHOD_CALL" category="CORRECTNESS" /> <BugPattern abbrev="AIOB" type="AIOB_ARRAY_INDEX_OUT_OF_BOUNDS" category="CORRECTNESS" /> @@ -618,5 +620,12 @@ <BugPattern abbrev="UAC" type="UAC_UNNECESSARY_API_CONVERSION_FILE_TO_PATH" category="CORRECTNESS"/> <BugPattern abbrev="RFI" type="RFI_SET_ACCESSIBLE" category="CORRECTNESS" experimental="true"/> <BugPattern abbrev="AI" type="AI_ANNOTATION_ISSUES_NEEDS_NULLABLE" category="CORRECTNESS" experimental="true" /> - <BugPattern abbrev="MUP" type="MUP_CONTAINSKEY_BEFORE_GET" category="STYLE" experimental="true" /> + <BugPattern abbrev="MUI" type="MUI_CONTAINSKEY_BEFORE_GET" category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MUI" type="MUI_GET_BEFORE_REMOVE" category="CORRECTNESS"/> + <BugPattern abbrev="MUI" type="MUI_CALLING_SIZE_ON_SUBCONTAINER" category="CORRECTNESS" /> + <BugPattern abbrev="MUI" type="MUI_NULL_CHECK_ON_MAP_SUBSET_ACCESSOR" category="CORRECTNESS" /> + <BugPattern abbrev="MUI" type="MUI_USE_CONTAINSKEY" category="CORRECTNESS" /> + <BugPattern abbrev="LUI" type="LUI_USE_SINGLETON_LIST" category="CORRECTNESS" /> + <BugPattern abbrev="LUI" type="LUI_USE_COLLECTION_ADD" category="CORRECTNESS" /> + <BugPattern abbrev="LUI" type="LUI_USE_GET0" category="CORRECTNESS" /> </FindbugsPlugin> Modified: trunk/fb-contrib/etc/messages.xml =================================================================== --- trunk/fb-contrib/etc/messages.xml 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/etc/messages.xml 2018-03-04 05:43:03 UTC (rev 1832) @@ -1731,7 +1731,16 @@ </Details> </Detector> + <Detector class="com.mebigfatguy.fbcontrib.detect.ListUsageIssues"> + <Details> + <![CDATA[ + <p>Looks for dubious usage patterns around the List interface</p> + <p>It is a fast detector</p> + ]]> + </Details> + </Detector> + <Detector class="com.mebigfatguy.fbcontrib.debug.OCSDebugger"> <Details></Details> </Detector> @@ -3221,7 +3230,7 @@ </Details> </BugPattern> - <BugPattern type="SPP_USE_CONTAINSKEY"> + <BugPattern type="MUI_USE_CONTAINSKEY"> <ShortDescription>Method calls keySet() just to call contains, use containsKey instead</ShortDescription> <LongDescription>Method {1} calls keySet() just to call contains, use containsKey instead</LongDescription> <Details> @@ -3490,7 +3499,7 @@ </Details> </BugPattern> - <BugPattern type="SPP_NULL_CHECK_ON_MAP_SUBSET_ACCESSOR"> + <BugPattern type="MUI_NULL_CHECK_ON_MAP_SUBSET_ACCESSOR"> <ShortDescription>Method checks whether the keySet(), entrySet() or values() collection of a Map is null</ShortDescription> <LongDescription>Method {1} checks whether the keySet(), entrySet() or values() collection of a Map is null</LongDescription> <Details> @@ -4957,6 +4966,28 @@ ]]> </Details> </BugPattern> + + <BugPattern type="PSC_SUBOPTIMAL_COLLECTION_SIZING"> + <ShortDescription>Method uses suboptimal sizing to allocation a collection</ShortDescription> + <LongDescription>Method {1} uses suboptimal sizing to allocation a collection</LongDescription> + <Details> + <![CDATA[ + <p>This method allocates a collection using the a constructor that takes a size parameter. However, + because Maps and Sets have a loading factor, passing in the exact size you want is an + incorrect way to presize the collection, and may still cause reallocations. Since you are using + Guava, it is better to use + <code><pre> + Maps.newHashMapWithExpectedSize(c.size()); + </pre></code> + or + <code><pre> + Sets.newHashSetWithExpectedsize(c.size()); + </pre></code> + as this method calculates the correct size taking into account the loading factor. + </p> + ]]> + </Details> + </BugPattern> <BugPattern type="UMTP_UNBOUND_METHOD_TEMPLATE_PARAMETER"> <ShortDescription>Method declares unbound method template parameter(s)</ShortDescription> @@ -5991,7 +6022,7 @@ <![CDATA[ <p>This method creates a java.nio.file.Path object by first creating a java.io.File object, and then calling toPath() on it. It is simpler to just construct the Path object directly, say by using - {@code Path.get(String...)}. + {@code Paths.get(String...)}. </p> ]]> </Details> @@ -6034,7 +6065,20 @@ </Details> </BugPattern> - <BugPattern type="MUP_CONTAINSKEY_BEFORE_GET"> + <BugPattern type="MUI_CALLING_SIZE_ON_SUBCONTAINER"> + <ShortDescription>Method calls size() on a sub collection of a Map</ShortDescription> + <LongDescription>Method {1} calls size() on a sub collection of a Map</LongDescription> + <Details> + <![CDATA[ + <p>This method calls size on the keySet(), entrySet() or values() collection of a Map. These sub collections + will have the same size as the base Map and so it is just simpler to call size on that Map. Calling size() on + one of these sub collections will causes unnecessary allocations to occur. + </p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MUI_CONTAINSKEY_BEFORE_GET"> <ShortDescription>Method check a map with containsKey(), before using get()</ShortDescription> <LongDescription>Method {1} checks a map with containsKey(), before using get()</LongDescription> <Details> @@ -6086,12 +6130,87 @@ } where NOT_FOUND is some constant that denotes this special status. Of course you will need to find a special sentinel value for each type you are using that isn't possible to have normally. - </p> </pre> </code> + </p> ]]> </Details> </BugPattern> + + <BugPattern type="MUI_GET_BEFORE_REMOVE"> + <ShortDescription>Method gets an item from a map with get(), before using remove()</ShortDescription> + <LongDescription>Method {1} gets an item from a map with get(), before using remove()</LongDescription> + <Details> + <![CDATA[ + <p>This method fetches the value of an entry in a map using get(K k), and then follows it up with a remove(K k). + Since a remove() also returns the value, there is no point for doing the get, and just causes two map lookups + to occur when it can be done with just one.</p> + <p>As an example, instead of using + <code> + <pre> + Map<String, String> myMap = getSomeMap(); + String v myMap.get("foo")) { + myMap.remove("foo"); + </pre> + </code> + convert this to + <code> + <pre> + Map<String, String> myMap = getSomeMap(); + String v = myMap.remove("foo"); + </pre> + </code> + </p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="LUI_USE_SINGLETON_LIST"> + <ShortDescription>Method builds a list from one element using Arrays.asList</ShortDescription> + <LongDescription>Method {1} builds a list from one element using Arrays.asList rather than Collections.singletonList</LongDescription> + <Details> + <![CDATA[ + <p>This method builds a list using Arrays.asList(foo), passing in a single element. Arrays.asList needs to first create an array from this one + element, and then build a List that wraps this array. It is simpler to use Collections.singletonList(foo), which does not create the array, and + produces a far simpler instance of List. Since both of these arrays are immutable (from the Lists point of view) they are equivalent from a usage + standpoint. + </p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="LUI_USE_GET0"> + <ShortDescription>Method uses collection streaming to get first item in a List</ShortDescription> + <LongDescription>Method {1} uses collection streaming to get first item in a List</LongDescription> + <Details> + <![CDATA[ + <p>This method fetches the first item in a List using collection streaming. As a list is already ordered + there is no need to do that just use the regular get(0) interface.<br/> + Example: + <code><pre> + String s = myList.stream().findFirst().get(); + </pre></code> + Can be more simply done using + <code><pre> + String s = myList.get(0); + </pre></code> + </p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="LUI_USE_COLLECTION_ADD"> + <ShortDescription>Method passes a temporary one item list to Collection.addAll()</ShortDescription> + <LongDescription>Method {1} passes a temporary one item list to Collection.addAll()</LongDescription> + <Details> + <![CDATA[ + <p>This method creates a temporary list using Collections.singletonList, or Arrays.asList with one + element in it, and then turns around and calls the addAll() method on another collection. Since you + are only adding one element to the collection, it is simpler to just call the add(object) method on + the collection you are using and by pass creating the intermediate List.</p> + ]]> + </Details> + </BugPattern> <!-- BugCode --> @@ -6237,5 +6356,6 @@ <BugCode abbrev="UAC">Unnecessary Api Conversion</BugCode> <BugCode abbrev="RFI">Reflection Issues</BugCode> <BugCode abbrev="AI">Annotation Issues</BugCode> - <BugCode abbrev="MUP">Map Usage Issues</BugCode> + <BugCode abbrev="MUI">Map Usage Issues</BugCode> + <BugCode abbrev="LUI">List Usage Issues</BugCode> </MessageCollection> Modified: trunk/fb-contrib/htdocs/index.shtml =================================================================== --- trunk/fb-contrib/htdocs/index.shtml 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/htdocs/index.shtml 2018-03-04 05:43:03 UTC (rev 1832) @@ -68,7 +68,7 @@ </li> </ul> </p> - <p style="font-weight: bold;">The latest version of fb-contrib is 7.2.0 available for download + <p style="font-weight: bold;">The latest version of fb-contrib is 7.2.1 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 @@ -97,7 +97,7 @@ <li><b>[AI] Annotation Issues</b><br/> Looks for issues around use of common annotations </li> - <li><b>[MUP] Map Usage Issues</b><br/> + <li><b>[MUI] Map Usage Issues</b><br/> Looks for odd usage patterns when using Maps </li> </ul> Modified: trunk/fb-contrib/htdocs/repository.html =================================================================== --- trunk/fb-contrib/htdocs/repository.html 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/htdocs/repository.html 2018-03-04 05:43:03 UTC (rev 1832) @@ -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>7.2.0 or 7.2.0.sb</td></tr> + <tr><td><b>Version:</b></td><td>7.2.1 or 7.2.1.sb</td></tr> </table> </div> Modified: trunk/fb-contrib/pom.xml =================================================================== --- trunk/fb-contrib/pom.xml 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/pom.xml 2018-03-04 05:43:03 UTC (rev 1832) @@ -6,7 +6,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>com.mebigfatguy.fb-contrib</groupId> <artifactId>fb-contrib</artifactId> - <version>7.2.0</version> + <version>7.2.1</version> <!-- TODO: Delete this and replace with enforcer plugin. This is for maven plugins only! Latest maven will through warnings. --> <prerequisites> Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/FBContrib.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/FBContrib.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/FBContrib.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -37,7 +37,7 @@ public static void main(final String[] args) { JOptionPane.showMessageDialog(null, "To use fb-contrib, copy this jar file into your local FindBugs plugin directory, and use FindBugs as usual.\n\nfb-contrib is a trademark of MeBigFatGuy.com\nFindBugs is a trademark of the University of Maryland", - "fb-contrib: copyright 2005-2017", JOptionPane.INFORMATION_MESSAGE); + "fb-contrib: copyright 2005-2018", JOptionPane.INFORMATION_MESSAGE); System.exit(0); } } Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/CollectMethodsReturningImmutableCollections.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/CollectMethodsReturningImmutableCollections.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/CollectMethodsReturningImmutableCollections.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/CollectNullableMethodStatus.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/CollectNullableMethodStatus.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/CollectNullableMethodStatus.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -29,7 +29,7 @@ @SuppressWarnings({ "PMD", "CPD-START" }) public class CollectNullableMethodStatus extends AnnotationIssues implements NonReportingDetector { - public CollectNullableMethodStatus(BugReporter bugReporter) { + public CollectNullableMethodStatus(@SuppressWarnings("unused") BugReporter bugReporter) { super(null); } Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/ImmutabilityType.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/ImmutabilityType.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/ImmutabilityType.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/MethodInfo.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/MethodInfo.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/MethodInfo.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/Statistics.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/Statistics.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/collect/Statistics.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/debug/Debug.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/debug/Debug.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/debug/Debug.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,7 +1,7 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Kevin Lubick - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Kevin Lubick + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/debug/OCSDebugger.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/debug/OCSDebugger.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/debug/OCSDebugger.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractCollectionScanningDetector.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractCollectionScanningDetector.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractCollectionScanningDetector.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractOverriddenMethod.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractOverriddenMethod.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractOverriddenMethod.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AnnotationIssues.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AnnotationIssues.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AnnotationIssues.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -52,7 +52,7 @@ private static final String USER_NULLABLE_ANNOTATIONS = "fb-contrib.ai.annotations"; - public static final Set<String> NULLABLE_ANNOTATIONS = new HashSet<>(); + private static final Set<String> NULLABLE_ANNOTATIONS = new HashSet<>(); static { NULLABLE_ANNOTATIONS.add("Lorg/jetbrains/annotations/Nullable;"); @@ -128,6 +128,10 @@ return; } + if (method.isSynthetic() && !isCollecting()) { + return; + } + if (methodHasNullableAnnotation(method)) { if (isCollecting()) { MethodInfo methodInfo = Statistics.getStatistics().getMethodStatistics(getClassName(), method.getName(), method.getSignature()); Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayBasedCollections.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayBasedCollections.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayBasedCollections.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayIndexOutOfBounds.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayIndexOutOfBounds.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayIndexOutOfBounds.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BackportReusePublicIdentifiers.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BackportReusePublicIdentifiers.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BackportReusePublicIdentifiers.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,7 +1,7 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Bhaskar Maddala - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Bhaskar Maddala + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -81,13 +81,13 @@ private static final Set<FQMethod> dangerousAssignmentMethodSources = UnmodifiableSet.create( //@formatter:off - new FQMethod("java/lang/System", "currentTimeMillis", "()J"), - new FQMethod("java/lang/System", "nanoTime", "()J"), - new FQMethod("java/util/Calendar", "get", "(I)I"), - new FQMethod("java/util/GregorianCalendar", "get", "(I)I"), - new FQMethod("java/util/Iterator", "next", "()Ljava/lang/Object;"), - new FQMethod("java/util/regex/Matcher", "start", "()I"), - new FQMethod("java/util/concurrent/TimeUnit", "toMillis", "(J)J") + new FQMethod("java/lang/System", "currentTimeMillis", SignatureBuilder.SIG_VOID_TO_LONG), + new FQMethod("java/lang/System", "nanoTime", SignatureBuilder.SIG_VOID_TO_LONG), + new FQMethod("java/util/Calendar", "get", SignatureBuilder.SIG_INT_TO_INT), + new FQMethod("java/util/GregorianCalendar", "get", SignatureBuilder.SIG_INT_TO_INT), + new FQMethod("java/util/Iterator", "next", SignatureBuilder.SIG_VOID_TO_OBJECT), + new FQMethod("java/util/regex/Matcher", "start", SignatureBuilder.SIG_VOID_TO_INT), + new FQMethod("java/util/concurrent/TimeUnit", "toMillis", SignatureBuilder.SIG_LONG_TO_LONG) //@formatter:on ); Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BogusExceptionDeclaration.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BogusExceptionDeclaration.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BogusExceptionDeclaration.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BuryingLogic.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BuryingLogic.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/BuryingLogic.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CharsetIssues.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CharsetIssues.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CharsetIssues.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CloneUsability.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CloneUsability.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CloneUsability.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CollectionNamingConfusion.java =================================================================== --- trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CollectionNamingConfusion.java 2017-12-27 00:20:36 UTC (rev 1831) +++ trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CollectionNamingConfusion.java 2018-03-04 05:43:03 UTC (rev 1832) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2017 Dave Brosius + * Copyright (C) 2005-2018 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -48,7 +48,7 @@ private JavaClass queueInterface; private BugReporter bugRe... [truncated message content] |