[Fb-contrib-commit] SF.net SVN: fb-contrib:[1804] trunk/fb-contrib
Brought to you by:
dbrosius
From: <dbr...@us...> - 2016-11-18 03:35:11
|
Revision: 1804 http://sourceforge.net/p/fb-contrib/code/1804 Author: dbrosius Date: 2016-11-18 03:35:06 +0000 (Fri, 18 Nov 2016) Log Message: ----------- sync from github Modified Paths: -------------- trunk/fb-contrib/.classpath trunk/fb-contrib/.project trunk/fb-contrib/build.properties 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/etc/samples.fbp 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/CollectStatistics.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/detect/AbnormalFinallyBlockReturn.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/AbstractCollectionScanningDetector.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/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/IOIssues.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ImmatureClass.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/InefficientStringBuffering.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/MethodReturnsConstant.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/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/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/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/ReflectionOnObjectMethods.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/StackedTryBlocks.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/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/UnboundMethodTemplateParameter.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UnitTestAssertionOddities.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/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/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/OpcodeUtils.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/RegisterUtils.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/SignatureUtils.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/TernaryPatcher.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/AIOB_Sample.java trunk/fb-contrib/src/samples/java/LO_Sample.java trunk/fb-contrib/src/samples/java/MRC_Sample.java trunk/fb-contrib/src/samples/java/SPP_Sample.java trunk/fb-contrib/yank.xls Added Paths: ----------- trunk/fb-contrib/samples.xml trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousShadedClassUse.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UseTryWithResources.java trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/SignatureBuilder.java trunk/fb-contrib/src/samples/java/SSCU_Sample.java trunk/fb-contrib/src/samples/java/UTWR_Sample.java Modified: trunk/fb-contrib/.classpath =================================================================== --- trunk/fb-contrib/.classpath 2016-11-18 03:30:45 UTC (rev 1803) +++ trunk/fb-contrib/.classpath 2016-11-18 03:35:06 UTC (rev 1804) @@ -1,39 +1,43 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry excluding="**/*.*" kind="src" path="etc"/> - <classpathentry kind="src" path="src"/> - <classpathentry excluding="lib/" kind="src" output="target/classes/samples" path="samples"/> + <classpathentry kind="src" output="target/classes/samples" path="src/samples/java"/> + <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="src" output="target/classes/test" path="src/test/java"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="lib" path="lib/backport-util-concurrent-3.1.jar"/> - <classpathentry kind="lib" path="lib/commons-collections-3.2.1.jar"/> <classpathentry kind="lib" path="lib/javax.servlet-api-3.1.0.jar"/> <classpathentry kind="lib" path="lib/log4j-1.2.17.jar"/> <classpathentry kind="lib" path="lib/javax.servlet.jsp-api-2.3.1.jar"/> - <classpathentry kind="lib" path="lib/commons-lang3-3.3.jar"/> - <classpathentry kind="lib" path="lib/slf4j-api-1.7.7.jar"/> - <classpathentry kind="lib" path="lib/guava-17.0.jar" sourcepath="lib/sources/guava-17.0-sources.jar"/> - <classpathentry kind="lib" path="lib/httpclient-cache-4.3.4.jar"/> - <classpathentry kind="lib" path="lib/httpcore-4.3.2.jar"/> - <classpathentry kind="lib" path="lib/httpclient-4.3.4.jar"/> - <classpathentry kind="lib" path="lib/annotations-3.0.0.jar" sourcepath="/home/dave/.m2/repository/com/google/code/findbugs/annotations/3.0.0/annotations-3.0.0-sources.jar"/> - <classpathentry kind="lib" path="lib/asm-debug-all-5.0.2.jar" sourcepath="/home/dave/.m2/repository/org/ow2/asm/asm-debug-all/5.0.2/asm-debug-all-5.0.2-sources.jar"/> + <classpathentry kind="lib" path="lib/asm-debug-all-5.0.2.jar" sourcepath="lib/sources/asm-debug-all-5.0.2-sources.jar"/> <classpathentry kind="lib" path="lib/bcel-findbugs-6.0.jar" sourcepath="lib/sources/bcel-findbugs-6.0-sources.jar"> <attributes> <attribute name="javadoc_location" value="http://commons.apache.org/proper/commons-bcel/apidocs/"/> </attributes> </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 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="lib" path="lib/javax.persistence-2.1.1.jar"/> - <classpathentry kind="lib" path="lib/commons-io-1.3.2.jar" sourcepath="lib/sources/commons-io-1.3.2-sources.jar"/> <classpathentry kind="lib" path="lib/mockito-all-2.0.2-beta.jar"/> <classpathentry combineaccessrules="false" kind="src" path="/findbugs"/> - <classpathentry kind="lib" path="lib/spring-beans-4.3.2.RELEASE.jar"/> - <classpathentry kind="lib" path="lib/spring-tx-4.3.2.RELEASE.jar"/> - <classpathentry kind="lib" path="lib/spring-context-4.3.2.RELEASE.jar"/> <classpathentry kind="lib" path="lib/threetenbp-1.3.2.jar"/> + <classpathentry kind="lib" path="lib/commons-codec-1.10.jar"/> + <classpathentry kind="lib" path="lib/commons-collections-3.2.2.jar"/> + <classpathentry kind="lib" path="lib/commons-lang3-3.4.jar"/> + <classpathentry kind="lib" path="lib/findbugs-ant-3.0.0.jar"/> + <classpathentry kind="lib" path="lib/guava-19.0.jar" sourcepath="lib/sources/guava-19.0-sources.jar"/> + <classpathentry kind="lib" path="lib/httpclient-4.5.2.jar"/> + <classpathentry kind="lib" path="lib/httpclient-cache-4.5.2.jar"/> + <classpathentry kind="lib" path="lib/httpcore-4.4.5.jar"/> + <classpathentry kind="lib" path="lib/slf4j-api-1.7.21.jar"/> + <classpathentry kind="lib" path="lib/spring-beans-4.3.3.RELEASE.jar"/> + <classpathentry kind="lib" path="lib/spring-context-4.3.3.RELEASE.jar"/> + <classpathentry kind="lib" path="lib/spring-tx-4.3.3.RELEASE.jar"/> + <classpathentry kind="lib" path="lib/jena-shaded-guava-3.1.0.jar"/> + <classpathentry kind="lib" path="lib/findbugs-annotations-3.0.1.jar"/> + <classpathentry kind="lib" path="lib/testng-6.9.10.jar"/> + <classpathentry kind="lib" path="lib/jcommander-1.48.jar"/> + <classpathentry kind="lib" path="lib/commons-io-2.4.jar"/> <classpathentry kind="output" path="target/classes/main"/> </classpath> Modified: trunk/fb-contrib/.project =================================================================== --- trunk/fb-contrib/.project 2016-11-18 03:30:45 UTC (rev 1803) +++ trunk/fb-contrib/.project 2016-11-18 03:35:06 UTC (rev 1804) @@ -32,15 +32,4 @@ <nature>org.eclipse.pde.PluginNature</nature> <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature> </natures> - <filteredResources> - <filter> - <id>1351977185587</id> - <name>samples</name> - <type>10</type> - <matcher> - <id>org.eclipse.ui.ide.multiFilter</id> - <arguments>1.0-name-matches-false-false-.svn</arguments> - </matcher> - </filter> - </filteredResources> </projectDescription> Modified: trunk/fb-contrib/build.properties =================================================================== --- trunk/fb-contrib/build.properties 2016-11-18 03:30:45 UTC (rev 1803) +++ trunk/fb-contrib/build.properties 2016-11-18 03:35:06 UTC (rev 1804) @@ -3,9 +3,10 @@ META-INF/,\ . jars.compile.order = . -source.. = src/,\ - etc/,\ - samples/ +source.. = src/main/java,\ + src/test/java,\ + src/samples/java,\ + etc/ output.. = target/classes/main proxy.server = Modified: trunk/fb-contrib/build.xml =================================================================== --- trunk/fb-contrib/build.xml 2016-11-18 03:30:45 UTC (rev 1803) +++ trunk/fb-contrib/build.xml 2016-11-18 03:35:06 UTC (rev 1804) @@ -14,21 +14,24 @@ <property file="build.properties" /> <property file="version.properties" /> - <property name="src.dir" value="${basedir}/src" /> + <property name="src.dir" value="${basedir}/src/main/java" /> <property name="lib.dir" value="${basedir}/lib" /> <property name="etc.dir" value="${basedir}/etc" /> + <property name="test.dir" value="${basedir}/src/test/java" /> <property name="target.dir" value="${basedir}/target" /> - <property name="samples.dir" value="${basedir}/samples" /> + <property name="samples.dir" value="${basedir}/src/samples/java" /> <property name="main.classes.dir" value="${target.dir}/classes/main" /> <property name="samples.classes.dir" value="${target.dir}/classes/samples" /> + <property name="test.classes.dir" value="${target.dir}/classes/test" /> <property name="javadoc.dir" value="${target.dir}/javadoc" /> <property name="htdocs.dir" value="${basedir}/htdocs" /> <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" /> + <property name="test_reports.dir" value="${target.dir}/reports/test"/> - <property name="fb-contrib.version" value="6.9.0-SNAPSHOT" /> + <property name="fb-contrib.version" value="6.8.1" /> <property name="sonatype.dir" value="${user.home}/.fb-contrib-${fb-contrib.version}-sonatype" /> @@ -39,15 +42,16 @@ <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.6.1/yank-1.6.1.jar" dest="${user.home}/.ant/lib"/> + <get src="http://repo1.maven.org/maven2/com/mebigfatguy/yank/yank/1.8.0/yank-1.8.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"/> - <get src="http://repo1.maven.org/maven2/com/mebigfatguy/fb-delta/fb-delta/0.4.1/fb-delta-0.4.1.jar" dest="${user.home}/.ant/lib" ignoreerrors="true"/> + <get src="http://repo1.maven.org/maven2/com/mebigfatguy/fb-delta/fb-delta/0.6.0/fb-delta-0.6.0.jar" dest="${user.home}/.ant/lib" ignoreerrors="true"/> + <get src="http://repo1.maven.org/maven2/com/mebigfatguy/stringliterals/stringliterals/0.2.0/stringliterals-0.2.0.jar" dest="${user.home}/.ant/lib" ignoreerrors="true"/> </target> <target name="yank" xmlns:yank="antlib:com.mebigfatguy.yank" unless="no.yank"> <mkdir dir="${lib.dir}" /> - <yank:yank yankFile="${basedir}/yank.xls" destination="${lib.dir}" proxyServer="${proxy.server}" source="true" separateClassifierTypes="true"> + <yank:yank yankFile="${basedir}/yank.xls" destination="${lib.dir}" proxyServer="${proxy.server}" source="true" separateClassifierTypes="true" checkSHADigests="true"> <server url="http://repo1.maven.org/maven2" /> <generateVersions propertyFileName="${basedir}/version.properties" /> </yank:yank> @@ -57,7 +61,8 @@ <echo message="fb-contrib - a findbugs plugin"/> <echo message=""/> <echo message=" This project requires three jars to build fb-contrib: yank, bug-rank-check-style, vcsversion and" /> - <echo message=" and optionally fb-delta, to generate delta's of bug reports"/> + <echo message=" and optionally fb-delta, to generate delta's of bug reports, as well as stringliterals to dump"/> + <echo message=" a report of all string literals used in the code"/> <echo message=""/> <echo message=" This project uses yank (https://github.com/mebigfatguy/yank) for dependency management"/> <echo message=" download yank.jar and place in ~/.ant/lib directory"/> @@ -77,6 +82,10 @@ <echo message=" and can be downloaded and placed in ~/.ant/lib as well"/> <echo message=" http://search.maven.org/#search%7Cga%7C1%7Cfb-delta"/> <echo message="===="/> + <echo message=" If you want to generate a report of all string literals used in the code base, this project also uses stringliterals to do"/> + <echo message=" that, and can be downloaded and placed in ~/.ant/lib as well"/> + <echo message=" http://search.maven.org/#search%7Cga%7C1%7Cstringliterals"/> + <echo message="===="/> <echo message=" This task can be automated by running ant infra_jars"/> </target> @@ -86,14 +95,21 @@ <target name="-init" depends="yank"> <mkdir dir="${lib.dir}" /> <mkdir dir="${main.classes.dir}" /> + <mkdir dir="${test.classes.dir}" /> <mkdir dir="${samples.classes.dir}" /> <mkdir dir="${javadoc.dir}" /> <path id="fb-contrib.classpath"> <pathelement location="${lib.dir}/findbugs-${findbugs.version}.jar" /> <pathelement location="${lib.dir}/bcel-findbugs-${bcel-findbugs.version}.jar" /> - <pathelement location="${lib.dir}/annotations-${annotations.version}.jar" /> + <pathelement location="${lib.dir}/findbugs-annotations-${findbugs-annotations.version}.jar" /> <pathelement location="${lib.dir}/asm-debug-all-${asm-debug-all.version}.jar" /> + <pathelement location="${main.classes.dir}" /> </path> + <path id="fb-contrib.test.classpath"> + <pathelement location="${lib.dir}/testng-${testng.version}.jar" /> + <pathelement location="${lib.dir}/jcommander-${jcommander.version}.jar" /> + <pathelement location="${lib.dir}/mockito-all-${mockito-all.version}.jar" /> + </path> <path id="fb-contrib.samples.classpath"> <pathelement location="${lib.dir}/javax.servlet.jsp-api-${javax.servlet.jsp-api.version}.jar" /> <pathelement location="${lib.dir}/junit-${junit.version}.jar" /> @@ -116,6 +132,7 @@ <pathelement location="${lib.dir}/spring-tx-${spring-tx.version}.jar" /> <pathelement location="${lib.dir}/javax.persistence-${javax.persistence.version}.jar" /> <pathelement location="${lib.dir}/mockito-all-${mockito-all.version}.jar" /> + <pathelement location="${lib.dir}/jena-shaded-guava-${jena-shaded-guava.version}.jar" /> </path> </target> @@ -134,11 +151,18 @@ <classpath refid="fb-contrib.classpath" /> </javac> </target> + + <target name="compile_test" depends="compile" description="compiles java test files"> + <javac srcdir="${test.dir}" destdir="${test.classes.dir}" source="${javac.source}" target="${javac.target}" deprecation="${javac.deprecation}" debug="${javac.debug}" includeantruntime="false"> + <classpath refid="fb-contrib.classpath" /> + <classpath refid="fb-contrib.test.classpath" /> + </javac> + </target> <target name="compile_samples" depends="-init" description="compiles sample problem files"> <javac srcdir="${samples.dir}" destdir="${samples.classes.dir}" source="1.7" target="1.7" deprecation="${javac.deprecation}" debug="${javac.debug}" includeantruntime="false"> <compilerarg value="-XDignore.symbol.file"/> - <classpath refid="fb-contrib.classpath" /> + <classpath refid="fb-contrib.classpath" /> <classpath refid="fb-contrib.samples.classpath" /> </javac> <delete file="${samples.dir}/SJVU_Sample.class" /> @@ -148,7 +172,19 @@ <classpath refid="fb-contrib.samples.classpath" /> </javac> </target> + + <target name="test" depends="compile_test" unless="no.test" description="runs unit tests"> + <mkdir dir="${test_reports.dir}" /> + <taskdef resource="testngtasks" classpath="${lib.dir}/testng-${testng.version}.jar"/> + <testng outputDir="${test_reports.dir}"> + <classfileset dir="${test.classes.dir}" includes="**/*.class"/> + <classpath refid="fb-contrib.classpath"/> + <classpath refid="fb-contrib.test.classpath"/> + <classpath location="${test.classes.dir}"/> + </testng> + </target> + <target name="jar" depends="compile" xmlns:vcs="antlib:com.mebigfatguy.vcsversion" description="produces the fb-contrib jar file"> <vcs:vcsversion vcs="git" revisionProperty="_rev_" dateProperty="_date_" branchProperty="_branch_" urlProperty="_url_"/> <jar destfile="${target.dir}/fb-contrib-${fb-contrib.version}.jar"> @@ -202,6 +238,7 @@ <include name="**/*.md" /> <include name="**/*.xls" /> <include name="**/*.example" /> + <include name="**/*.fbp" /> </fileset> </zip> </target> @@ -213,7 +250,7 @@ </javadoc> </target> - <target name="build" depends="clean, -init, validate_xml, compile, compile_samples, jar" description="builds the plugin jar"> + <target name="build" depends="-init, validate_xml, compile, compile_test, compile_samples, test, jar" description="builds the plugin jar"> </target> <target name="install" depends="build" description="installs the plugin into FindBugs"> @@ -225,7 +262,7 @@ </copy> </target> - <target name="sample_delta" depends="build" xmlns:fbdelta="antlib:com.mebigfatguy.fbdelta" description="compares this runs reported bugs on the sample classes set, against the stored report"> + <target name="sample_delta" depends="install" xmlns:fbdelta="antlib:com.mebigfatguy.fbdelta" description="compares this runs reported bugs on the sample classes set, against the stored report"> <taskdef resource="edu/umd/cs/findbugs/anttask/tasks.properties" classpath="${lib.dir}/findbugs-ant-${findbugs-ant.version}.jar"/> <findbugs reportlevel="low" home="${findbugs.dir}" auxClassPathRef="fb-contrib.samples.classpath" output="xml:withMessages" jvmargs="-ea -Xmx800m" projectName="Samples" outputFile="${target.dir}/samples.xml"> <class location="${samples.classes.dir}" /> @@ -239,6 +276,16 @@ <loadfile property="diff" srcFile="${target.dir}/samples_delta.xml"/> <echo>${diff}</echo> </target> + + <target name="literals" depends="jar" xmlns:stringliterals="antlib:com.mebigfatguy.stringliterals" description="generate report of string literals used in code"> + <stringliterals:stringliterals> + <classpath id="source"> + <fileset dir="${main.classes.dir}"> + <include name="**/*.class"/> + </fileset> + </classpath> + </stringliterals:stringliterals> + </target> <target name="release" depends="build, srczip, html, javadoc" description="prepares everything for a release" /> Modified: trunk/fb-contrib/etc/bugrank.txt =================================================================== --- trunk/fb-contrib/etc/bugrank.txt 2016-11-18 03:30:45 UTC (rev 1803) +++ trunk/fb-contrib/etc/bugrank.txt 2016-11-18 03:35:06 UTC (rev 1804) @@ -216,6 +216,8 @@ +0 BugPattern SPP_USE_ISNAN +0 BugPattern SPP_USE_MATH_CONSTANT +0 BugPattern SPP_USE_STRINGBUILDER_LENGTH ++0 BugPattern SPP_WRONG_COMMONS_TO_STRING_OBJECT ++0 BugPattern SSCU_SUSPICIOUS_SHADED_CLASS_USE +0 BugPattern STB_STACKED_TRY_BLOCKS +2 BugPattern STS_SPURIOUS_THREAD_STATES +0 BugPattern STT_STRING_PARSING_A_FIELD @@ -259,6 +261,7 @@ +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 UTWR_USE_TRY_WITH_RESOURCES +0 BugPattern UVA_USE_VAR_ARGS +0 BugPattern WEM_OBSCURING_EXCEPTION +0 BugPattern WEM_WEAK_EXCEPTION_MESSAGING Modified: trunk/fb-contrib/etc/findbugs.xml =================================================================== --- trunk/fb-contrib/etc/findbugs.xml 2016-11-18 03:30:45 UTC (rev 1803) +++ trunk/fb-contrib/etc/findbugs.xml 2016-11-18 03:35:06 UTC (rev 1804) @@ -2,7 +2,7 @@ <!-- Plugin descriptor for fb-contrib plugin. This plugin is enabled by default. --> <FindbugsPlugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="findbugsplugin.xsd" pluginid="com.mebigfatguy.fbcontrib" defaultenabled="true" - provider="fb-contrib project" website="http://fb-contrib.sourceforge.net"> + provider="fb-contrib project" website="http://github.com/mebigfatguy/fb-contrib"> <!-- Passes --> @@ -20,7 +20,7 @@ <!-- Detectors --> -<!-- COMMENT OUT FOR RELEASE --> +<!-- COMMENT OUT FOR RELEASE <Detector class="com.mebigfatguy.fbcontrib.debug.OCSDebugger" speed="fast"/> @@ -30,7 +30,7 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" speed="fast" reports="BAS_BLOATED_ASSIGNMENT_SCOPE" hidden="true" /> -<!-- COMMENT OUT FOR RELEASE --> + COMMENT OUT FOR RELEASE --> <Detector class="com.mebigfatguy.fbcontrib.collect.CollectStatistics" speed="fast" reports="" hidden="true" /> @@ -145,7 +145,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" /> + 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" /> <Detector class="com.mebigfatguy.fbcontrib.detect.SpoiledChildInterfaceImplementor" speed="fast" reports="SCII_SPOILED_CHILD_INTERFACE_IMPLEMENTOR" /> @@ -305,9 +305,14 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.ConcurrentCollectionIssues" speed="fast" reports="CCI_CONCURRENT_COLLECTION_ISSUES_USE_PUT_IS_RACY"/> - <!-- COMMENT OUT FOR POINT RELEASE --> - <!-- COMMENT OUT FOR POINT RELEASE --> + <!-- COMMENT OUT FOR POINT RELEASE + <Detector class="com.mebigfatguy.fbcontrib.detect.UseTryWithResources" speed="fast" reports="UTWR_USE_TRY_WITH_RESOURCES"/> + + <Detector class="com.mebigfatguy.fbcontrib.detect.SuspiciousShadedClassUse" speed="fast" reports="SSCU_SUSPICIOUS_SHADED_CLASS_USE"/> + + COMMENT OUT FOR POINT RELEASE --> + <!-- BugPattern --> <BugPattern abbrev="ISB" type="ISB_INEFFICIENT_STRING_BUFFERING" category="PERFORMANCE" /> @@ -418,6 +423,7 @@ <BugPattern abbrev="SPP" type="SPP_CONVERSION_OF_STRING_LITERAL" category="CORRECTNESS" /> <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="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" /> @@ -574,4 +580,6 @@ <BugPattern abbrev="BL" type="BL_BURYING_LOGIC" category="STYLE"/> <BugPattern abbrev="WI" type="WI_DUPLICATE_WIRED_TYPES" category="CORRECTNESS"/> <BugPattern abbrev="CCI" type="CCI_CONCURRENT_COLLECTION_ISSUES_USE_PUT_IS_RACY" category="CORRECTNESS"/> + <BugPattern abbrev="UTWR" type="UTWR_USE_TRY_WITH_RESOURCES" category="STYLE" experimental="true"/> + <BugPattern abbrev="SSCU" type="SSCU_SUSPICIOUS_SHADED_CLASS_USE" category="CORRECTNESS" experimental="true"/> </FindbugsPlugin> Modified: trunk/fb-contrib/etc/messages.xml =================================================================== --- trunk/fb-contrib/etc/messages.xml 2016-11-18 03:30:45 UTC (rev 1803) +++ trunk/fb-contrib/etc/messages.xml 2016-11-18 03:35:06 UTC (rev 1804) @@ -362,7 +362,7 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.ArrayBasedCollections"> <Details> <![CDATA[ - <p>Looks for methods that use arrays for items in the keyset of a map, or as + <p>Looks for methods that use arrays for items in the keySet of a map, or as an element of a set, or in a list when using the contains method. Since arrays do not, and cannot define an equals method, reference equality is used for these collections, which is probably not desired. If it is, consider using the IdentityHashMap @@ -1233,7 +1233,7 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.CommonsEqualsBuilderToEquals"> <Details> <![CDATA[ - <p>This detector looks for uses for Commons-lang EqualsBuilder where the + <p>This detector looks for uses for commons-lang EqualsBuilder where the result of equals() is returned instead of calling the method isEquals().</p> <p>It is a fast detector.</p> ]]> @@ -1243,7 +1243,7 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.CommonsHashcodeBuilderToHashcode"> <Details> <![CDATA[ - <p>This detector looks for uses for Commons-lang <code>HashCodeBuilder</code> where the + <p>This detector looks for uses for commons-lang <code>HashCodeBuilder</code> where the result of <code>hashCode()</code> is returned instead of calling the method <code>toHashCode()</code>.</p> <p>It is a fast detector.</p> ]]> @@ -1253,7 +1253,7 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.CommonsStringBuilderToString"> <Details> <![CDATA[ - <p>This detector looks for uses for Commons-lang <code>ToStringBuilder</code> where the + <p>This detector looks for uses for commons-lang <code>ToStringBuilder</code> where the result of <code>toString()</code> is returned without an intermediate invocation of toString().</p> <p>It is a fast detector.</p> ]]> @@ -1457,7 +1457,7 @@ <Details> <![CDATA[ <p>Looks for methods that perform arithmetic operations on values representing time - where the time unit is incompatible, ie adding a millisecond value to a nanosecond value. + where the time unit is incompatible, i.e. adding a millisecond value to a nanosecond value. </p> <p>It is a fast detector.</p> ]]> @@ -1632,11 +1632,38 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.ConcurrentCollectionIssues"> <Details> <![CDATA[ - <p>Looks for problems with using concurrent collecctions</p> + <p>Looks for problems with using concurrent collections + <ul> + <li>Adding a collection as a value of Concurrent map, without the use of putIfAbsent</li> + </ul> + </p> <p>It is a fast detector.</p> ]]> </Details> </Detector> + + <Detector class="com.mebigfatguy.fbcontrib.detect.UseTryWithResources"> + <Details> + <![CDATA[ + <p>Looks for use of auto-closeable resources in JDK 7 or later that are not using + the try-with-resources paradigm. To avoid problems, and ease the reader, use of try-with-resources + is recommended</p> + <p>It is a fast detector.</p> + ]]> + </Details> + </Detector> + + <Detector class="com.mebigfatguy.fbcontrib.detect.SuspiciousShadedClassUse"> + <Details> + <![CDATA[ + <p>Looks for use of shaded methods from 3rdparty jars, created by tools such as the maven shade plugin. + These methods are from classes that have been included in a jar, for internal use, and are copies of real 3rdparty jars. + It is likely you meant to use the real class from the real jar, but your IDE picked the wrong import to use. + </p> + <p>It is a fast detector.</p> + ]]> + </Details> + </Detector> <Detector class="com.mebigfatguy.fbcontrib.debug.OCSDebugger"> <Details></Details> @@ -3380,6 +3407,21 @@ ]]> </Details> </BugPattern> + + <BugPattern type="SPP_WRONG_COMMONS_TO_STRING_OBJECT"> + <ShortDescription>Method does not pass an object to commons-lang's ToStringBuilder</ShortDescription> + <LongDescription>Method {1} does not pass an object to commons-lang's ToStringBuilder</LongDescription> + <Details> + <![CDATA[[ + This method uses commons-lang, or commons-lang3's ToStringBuilder to attempt to output a representation of an object. + However, no object was passed, just the style specifier, and so the output will be of the ToStringStyle object itself. + Don't forget to include the object you wish to output as the first parameter, such as + <pre> + ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); + </pre> + ]]> + </Details> + </BugPattern> <BugPattern type="BAS_BLOATED_ASSIGNMENT_SCOPE"> <ShortDescription>Method assigns a variable in a larger scope than is needed</ShortDescription> @@ -4791,6 +4833,7 @@ <li>Sets.newHashSetWithExpectedSize(int)</li> <li>Maps.newHashMapWithExpectedSize(int)</li> </ul> + If not, a good estimate would be the expectedSize / {LOADING_FACTOR} which by default is 0.75 </p> ]]> </Details> @@ -5595,6 +5638,47 @@ ]]> </Details> </BugPattern> + + <BugPattern type="UTWR_USE_TRY_WITH_RESOURCES"> + <ShortDescription>Method manually handles closing an auto-closeable resource</ShortDescription> + <LongDescription>Method {1} manually handles closing an auto-closeable resource</LongDescription> + <Details> + <![CDATA[[ + <p>This method allocates and uses a auto closeable resources. However it manually closes the resource in a finally block. + While this is correct management, it doesn't rely on the Idiomatic way available to JDK 7 and above, and allows for possible + subtle problems, and complicates the reading of code, by developers expecting the use of try-with-resources. + </p> + <p>Switch to using try with resources, as: + <pre> + try (InputStream is = getAStream()) { + useTheStream(is); + } + </pre> + ]]> + </Details> + </BugPattern> + + <BugPattern type="SSCU_SUSPICIOUS_SHADED_CLASS_USE"> + <ShortDescription>Method calls a method from a class that has been shaded by a 3rdparty jar</ShortDescription> + <LongDescription>Method {1} calls a method from a class that has been shaded by a 3rdparty jar</LongDescription> + <Details> + <![CDATA[ + <p>This method calls a method found in a 3rdparty library, which appears to be shaded from another 3rdparty library. + This occurs when a jar includes other code using tools like the maven shade plugin. It is likely you wanted to use the + "first-class" class from the original jar, rather than the class with the shaded package structure, but your IDE pulled in + the wrong import.</p> + <p>An example might be, you attempted to use a method from the class: + <pre><code> + com.google.common.collect.Sets + </code></pre> + But instead, you import: + <pre><code> + org.apache.jena.ext.com.google.common.collect.Sets + </code></pre> + </p> + ]]> + </Details> + </BugPattern> <!-- BugCode --> @@ -5733,4 +5817,6 @@ <BugCode abbrev="BL">Burying Logic</BugCode> <BugCode abbrev="WI">Wiring issues</BugCode> <BugCode abbrev="CCI">Concurrent Collection Issues</BugCode> + <BugCode abbrev="UTWR">Use Try With Resources</BugCode> + <BugCode abbrev="SSCU">Suspicious Shaded Class Use</BugCode> </MessageCollection> Modified: trunk/fb-contrib/etc/samples.fbp =================================================================== --- trunk/fb-contrib/etc/samples.fbp 2016-11-18 03:30:45 UTC (rev 1803) +++ trunk/fb-contrib/etc/samples.fbp 2016-11-18 03:35:06 UTC (rev 1804) @@ -1,24 +1,28 @@ <Project projectName="sample"> - <Jar>./././../target/classes/samples</Jar> - <AuxClasspathEntry>./././../lib/backport-util-concurrent-3.1.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/commons-collections-3.2.1.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/javax.servlet-api-3.1.0.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/javax.servlet.jsp-api-2.3.1.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/log4j-1.2.17.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/commons-lang3-3.3.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/slf4j-api-1.7.7.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/guava-17.0.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/httpclient-4.3.4.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/httpclient-cache-4.3.4.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/httpcore-4.3.2.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/commons-codec-1.6.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/commons-io-1.3.2.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/junit-4.12.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/testng-6.9.6.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/jsr311-api-1.1.1.jar</AuxClasspathEntry> - <AuxClasspathEntry>./././../lib/javax.persistence-2.1.1.jar</AuxClasspathEntry> - <AuxClasspathEntry>././../lib/mockito-all-2.0.2-beta.jar</AuxClasspathEntry> + <Jar>./../target/classes/samples</Jar> <AuxClasspathEntry>./../lib/asm-debug-all-5.0.2.jar</AuxClasspathEntry> - <AuxClasspathEntry>../lib/threetenbp-1.3.2.jar</AuxClasspathEntry> - <SrcDir>././././.</SrcDir> + <AuxClasspathEntry>./../lib/backport-util-concurrent-3.1.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/commons-codec-1.10.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/commons-collections-3.2.2.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/commons-lang3-3.4.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/guava-19.0.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/httpclient-4.5.2.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/httpclient-cache-4.5.2.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/httpcore-4.4.5.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/javax.persistence-2.1.1.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/javax.servlet-api-3.1.0.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/javax.servlet.jsp-api-2.3.1.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/jsr311-api-1.1.1.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/junit-4.12.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/log4j-1.2.17.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/mockito-all-2.0.2-beta.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/slf4j-api-1.7.21.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/spring-beans-4.3.3.RELEASE.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/spring-context-4.3.3.RELEASE.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/spring-tx-4.3.3.RELEASE.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/threetenbp-1.3.2.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/jena-shaded-guava-3.1.0.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/commons-io-2.4.jar</AuxClasspathEntry> + <AuxClasspathEntry>./../lib/testng-6.9.10.jar</AuxClasspathEntry> + <SrcDir>../src/samples/java</SrcDir> </Project> Modified: trunk/fb-contrib/htdocs/index.shtml =================================================================== --- trunk/fb-contrib/htdocs/index.shtml 2016-11-18 03:30:45 UTC (rev 1803) +++ trunk/fb-contrib/htdocs/index.shtml 2016-11-18 03:35:06 UTC (rev 1804) @@ -68,7 +68,7 @@ </li> </ul> </p> - <p style="font-weight: bold;">The latest version of fb-contrib is 6.8.0 available for download + <p style="font-weight: bold;">The latest version of fb-contrib is 6.8.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 @@ -81,7 +81,13 @@ Detectors added in git<br/> <div id="git" style="display:none;"> <ul> - <li>--none yet--</li> + <li><b>[UTWR] Use Try With Resources</b><br/> + Looks for try/finally blocks that manage resources, without using try-with-resources. + </li> + <li><b>[SSCU] Suspicious Shaded Class Use</b><br/> + Looks for use of classes that have been shaded into 3rdparty jars, rather than using the + real class, from the real jar. + </li> </ul> </div> <hr/> Modified: trunk/fb-contrib/htdocs/repository.html =================================================================== --- trunk/fb-contrib/htdocs/repository.html 2016-11-18 03:30:45 UTC (rev 1803) +++ trunk/fb-contrib/htdocs/repository.html 2016-11-18 03:35:06 UTC (rev 1804) @@ -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.8.0</td></tr> + <tr><td><b>Version:</b></td><td>6.8.1</td></tr> </table> </div> Modified: trunk/fb-contrib/pom.xml =================================================================== --- trunk/fb-contrib/pom.xml 2016-11-18 03:30:45 UTC (rev 1803) +++ trunk/fb-contrib/pom.xml 2016-11-18 03:35:06 UTC (rev 1804) @@ -8,7 +8,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>com.mebigfatguy.fb-contrib</groupId> <artifactId>fb-contrib</artifactId> - <version>6.9.0-SNAPSHOT</version> + <version>6.8.1</version> <prerequisites> <maven>2.2.1</maven> @@ -144,8 +144,8 @@ <scope>provided</scope> </dependency> <dependency><scope>test</scope><groupId>backport-util-concurrent</groupId><artifactId>backport-util-concurrent</artifactId><version>3.1</version></dependency> - <dependency><scope>test</scope><groupId>com.google.guava</groupId><artifactId>guava</artifactId><version>17.0</version></dependency> - <dependency><scope>test</scope><groupId>commons-codec</groupId><artifactId>commons-codec</artifactId><version>1.6</version></dependency> + <dependency><scope>test</scope><groupId>com.google.guava</groupId><artifactId>guava</artifactId><version>19.0</version></dependency> + <dependency><scope>test</scope><groupId>commons-codec</groupId><artifactId>commons-codec</artifactId><version>1.10</version></dependency> <dependency><scope>test</scope><groupId>commons-io</groupId><artifactId>commons-io</artifactId><version>2.4</version></dependency> <dependency><scope>test</scope><groupId>commons-collections</groupId><artifactId>commons-collections</artifactId><version>3.2.1</version></dependency> <dependency><scope>test</scope><groupId>javax.persistence</groupId><artifactId>persistence-api</artifactId><version>1.0.2</version></dependency> @@ -155,22 +155,22 @@ <dependency><scope>test</scope><groupId>junit</groupId><artifactId>junit</artifactId><version>4.12</version></dependency> <dependency><scope>test</scope><groupId>log4j</groupId><artifactId>log4j</artifactId><version>1.2.17</version></dependency> <dependency><scope>test</scope><groupId>org.apache.commons</groupId><artifactId>commons-lang3</artifactId><version>3.3</version></dependency> - <dependency><scope>test</scope><groupId>org.apache.httpcomponents</groupId><artifactId>httpclient</artifactId><version>4.3.4</version></dependency> - <dependency><scope>test</scope><groupId>org.apache.httpcomponents</groupId><artifactId>httpcore</artifactId><version>4.3.2</version></dependency> - <dependency><scope>test</scope><groupId>org.mockito</groupId><artifactId>mockito-all</artifactId><version>1.10.19</version></dependency> - <dependency><scope>test</scope><groupId>org.slf4j</groupId><artifactId>slf4j-api</artifactId><version>1.7.7</version></dependency> - <dependency><scope>test</scope><groupId>org.springframework</groupId><artifactId>spring-tx</artifactId><version>4.3.2.RELEASE</version></dependency> + <dependency><scope>test</scope><groupId>org.apache.httpcomponents</groupId><artifactId>httpclient</artifactId><version>4.5.2</version></dependency> + <dependency><scope>test</scope><groupId>org.apache.httpcomponents</groupId><artifactId>httpcore</artifactId><version>4.4.5</version></dependency> + <dependency><scope>test</scope><groupId>org.mockito</groupId><artifactId>mockito-all</artifactId><version>2.0.2-beta</version></dependency> + <dependency><scope>test</scope><groupId>org.slf4j</groupId><artifactId>slf4j-api</artifactId><version>1.7.21</version></dependency> + <dependency><scope>test</scope><groupId>org.springframework</groupId><artifactId>spring-tx</artifactId><version>4.3.3.RELEASE</version></dependency> <dependency><scope>test</scope><groupId>org.testng</groupId><artifactId>testng</artifactId><version>6.9.10</version></dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> - <version>4.3.2.RELEASE</version> + <version>4.3.3.RELEASE</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> - <version>4.3.2.RELEASE</version> + <version>4.3.3.RELEASE</version> <scope>test</scope> </dependency> <dependency> @@ -179,11 +179,15 @@ <version>1.3.2</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.apache.jena</groupId> + <artifactId>jena-shaded-guava</artifactId> + <version>3.1.0</version> + <scope>test</scope> + </dependency> </dependencies> <build> - <sourceDirectory>${basedir}/src</sourceDirectory> - <testSourceDirectory>${basedir}/samples</testSourceDirectory> <outputDirectory>${basedir}/target/classes/main</outputDirectory> <resources> <resource> @@ -206,8 +210,9 @@ <plugins> <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>build-helper-maven-plugin</artifactId><version>1.9.1</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-compiler-plugin</artifactId><version>3.3</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> @@ -232,6 +237,7 @@ </archive> </configuration> </plugin> + <plugin><artifactId>maven-pmd-plugin</artifactId><version>3.5</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> @@ -242,14 +248,13 @@ <plugins> <plugin> - <artifactId>maven-pmd-plugin</artifactId><version>3.6</version> + <artifactId>maven-pmd-plugin</artifactId> <dependencies> <dependency><groupId>net.sourceforge.pmd</groupId><artifactId>pmd-java</artifactId><version>5.5.1</version></dependency> <dependency><groupId>net.sourceforge.pmd</groupId><artifactId>pmd-core</artifactId><version>5.5.1</version></dependency> </dependencies> <configuration> <rulesets> - <ruleset>/rulesets/java/basic.xml</ruleset> <ruleset>/rulesets/java/clone.xml</ruleset> <ruleset>/rulesets/java/finalizers.xml</ruleset> <ruleset>/rulesets/java/imports.xml</ruleset> @@ -280,6 +285,51 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId><artifactId>build-helper-maven-plugin</artifactId> + <configuration> + <sources> + <source>src/samples/java</source> + </sources> + </configuration> + <executions> + <execution> + <id>add-test-source</id> + <goals> + <goal>add-test-source</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.10</version> + <executions> + <execution> + <id>unpack-findbugs-core</id> + <phase>process-test-resources</phase> + <goals> + <goal>unpack</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>com.google.code.findbugs</groupId> + <artifactId>findbugs</artifactId> + <version>3.0.1</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory> + ${project.build.directory}/findbugs-3.0.1.jar/plugin + </outputDirectory> + </artifactItem> + </artifactItems> + <overWriteReleases>true</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + </configuration> + </execution> + </executio... [truncated message content] |