Skip to content

Commit

Permalink
Merge branch 'findbugs' into spotbugs
Browse files Browse the repository at this point in the history
Conflicts:
	src/main/java/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java
  • Loading branch information
mebigfatguy committed Oct 17, 2017
2 parents 23e7905 + 11b16a0 commit 9f69190
Show file tree
Hide file tree
Showing 8 changed files with 281 additions and 216 deletions.
1 change: 1 addition & 0 deletions etc/bugrank.txt
Expand Up @@ -282,5 +282,6 @@
+0 BugPattern WEM_OBSCURING_EXCEPTION
+0 BugPattern WEM_WEAK_EXCEPTION_MESSAGING
+0 BugPattern WI_DUPLICATE_WIRED_TYPES
+0 BugPattern WI_MANUALLY_ALLOCATING_AN_AUTOWIRED_BEAN
+0 BugPattern WOC_WRITE_ONLY_COLLECTION_FIELD
+0 BugPattern WOC_WRITE_ONLY_COLLECTION_LOCAL
3 changes: 2 additions & 1 deletion etc/findbugs.xml
Expand Up @@ -301,7 +301,7 @@

<Detector class="com.mebigfatguy.fbcontrib.detect.BuryingLogic" speed="fast" reports="BL_BURYING_LOGIC"/>

<Detector class="com.mebigfatguy.fbcontrib.detect.WiringIssues" speed="fast" reports="WI_DUPLICATE_WIRED_TYPES"/>
<Detector class="com.mebigfatguy.fbcontrib.detect.WiringIssues" speed="fast" reports="WI_DUPLICATE_WIRED_TYPES,WI_MANUALLY_ALLOCATING_AN_AUTOWIRED_BEAN"/>

<Detector class="com.mebigfatguy.fbcontrib.detect.ConcurrentCollectionIssues" speed="fast" reports="CCI_CONCURRENT_COLLECTION_ISSUES_USE_PUT_IS_RACY"/>

Expand Down Expand Up @@ -594,6 +594,7 @@
<BugPattern abbrev="DMC" type="DMC_DUBIOUS_MAP_COLLECTION" category="CORRECTNESS"/>
<BugPattern abbrev="BL" type="BL_BURYING_LOGIC" category="STYLE"/>
<BugPattern abbrev="WI" type="WI_DUPLICATE_WIRED_TYPES" category="CORRECTNESS"/>
<BugPattern abbrev="WI" type="WI_MANUALLY_ALLOCATING_AN_AUTOWIRED_BEAN" 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"/>
Expand Down
13 changes: 13 additions & 0 deletions etc/messages.xml
Expand Up @@ -5778,6 +5778,19 @@ if (shouldCalcHalting && (calculateHaltingProbability() &gt; 0) { }
</Details>
</BugPattern>

<BugPattern type="WI_MANUALLY_ALLOCATING_AN_AUTOWIRED_BEAN">
<ShortDescription>Method allocates an object with new when the class is defined as an autowireable bean</ShortDescription>
<LongDescription>Method {1} allocates an object with new when the class is defined as an autowireable bean</LongDescription>
<Details>
<![CDATA[
<p>this method allocates an object with new, but the class of the object that is being created is marked with a Spring annotation
denoting that this class is to be used through an @Autowire annotation. Allocating it with new, will likely mean that fields on the
class will not be autowired, but instead be null. You should just autowire an instance of this class into the class in question, or if
need be, use spring's getBean(name) method to fetch one.</p>
]]>
</Details>
</BugPattern>

<BugPattern type="CCI_CONCURRENT_COLLECTION_ISSUES_USE_PUT_IS_RACY">
<ShortDescription>Method gets and sets a value of a ConcurrentHashMap in a racy manner</ShortDescription>
<LongDescription>Method {1} gets and sets a value of a ConcurrentHashMap in a racy manner </LongDescription>
Expand Down

0 comments on commit 9f69190

Please sign in to comment.