Skip to content

Commit

Permalink
GitHub issue #120 address conflicting Bug Pattern prefix 'CD' with fi…
Browse files Browse the repository at this point in the history
…ndbugs, rename 'FCD'
  • Loading branch information
mebigfatguy committed Jul 24, 2016
1 parent ac0c8e2 commit 39a7121
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion etc/bugrank.txt
Expand Up @@ -17,7 +17,6 @@
+0 BugPattern CBX_CUSTOM_BUILT_XML
+0 BugPattern CCNE_COMPARE_CLASS_EQUALS_NAME
+2 BugPattern CC_CYCLOMATIC_COMPLEXITY
+2 BugPattern CD_CIRCULAR_DEPENDENCY
+0 BugPattern CEBE_COMMONS_EQUALS_BUILDER_ISEQUALS
+0 BugPattern CEBE_COMMONS_EQUAL_BUILDER_TOEQUALS
+2 BugPattern CE_CLASS_ENVY
Expand Down Expand Up @@ -51,6 +50,7 @@
+0 BugPattern EXS_EXCEPTION_SOFTENING_NO_CONSTRAINTS
+0 BugPattern EXS_EXCEPTION_SOFTENING_RETURN_FALSE
+0 BugPattern FCBL_FIELD_COULD_BE_LOCAL
+2 BugPattern FCD_FIND_CIRCULAR_DEPENDENCY
+0 BugPattern FPL_FLOATING_POINT_LOOPS
+6 BugPattern FP_FINAL_PARAMETERS
+0 BugPattern HCP_HTTP_REQUEST_RESOURCES_NOT_FREED_FIELD
Expand Down
4 changes: 2 additions & 2 deletions etc/findbugs.xml
Expand Up @@ -255,7 +255,7 @@

<Detector class="com.mebigfatguy.fbcontrib.detect.UnusedParameter" speed="fast" reports="UP_UNUSED_PARAMETER" />

<Detector class="com.mebigfatguy.fbcontrib.detect.CircularDependencies" speed="moderate" reports="CD_CIRCULAR_DEPENDENCY"/>
<Detector class="com.mebigfatguy.fbcontrib.detect.FindCircularDependencies" speed="moderate" reports="FCD_FIND_CIRCULAR_DEPENDENCY"/>

<Detector class="com.mebigfatguy.fbcontrib.collect.CollectMethodsReturningImmutableCollections" speed="fast" reports="" hidden="true" />

Expand Down Expand Up @@ -528,7 +528,7 @@
<BugPattern abbrev="CNC" type="CNC_COLLECTION_NAMING_CONFUSION" category="STYLE" />
<BugPattern abbrev="PME" type="PME_POOR_MANS_ENUM" category="STYLE" />
<BugPattern abbrev="UP" type="UP_UNUSED_PARAMETER" category="STYLE" />
<BugPattern abbrev="CD" type="CD_CIRCULAR_DEPENDENCY" category="CORRECTNESS" />
<BugPattern abbrev="FCD" type="FCD_FIND_CIRCULAR_DEPENDENCY" category="CORRECTNESS" />
<BugPattern abbrev="MUC" type="MUC_MODIFYING_UNMODIFIABLE_COLLECTION" category="CORRECTNESS" />
<BugPattern abbrev="UJM" type="UJM_UNJITABLE_METHOD" category="PERFORMANCE" />
<BugPattern abbrev="HES" type="HES_EXECUTOR_NEVER_SHUTDOWN" category="CORRECTNESS" />
Expand Down
6 changes: 3 additions & 3 deletions etc/messages.xml
Expand Up @@ -1403,7 +1403,7 @@ a[0] = new A(); // results in ArrayStoreException (Runtime)
</Details>
</Detector>

<Detector class="com.mebigfatguy.fbcontrib.detect.CircularDependencies">
<Detector class="com.mebigfatguy.fbcontrib.detect.FindCircularDependencies">
<Details>
<![CDATA[
<p>This detector looks circular dependencies among classes. </p>
Expand Down Expand Up @@ -4850,7 +4850,7 @@ if (name != null) {
</Details>
</BugPattern>

<BugPattern type="CD_CIRCULAR_DEPENDENCY">
<BugPattern type="FCD_FIND_CIRCULAR_DEPENDENCY">
<ShortDescription>Class has a circular dependency with other classes</ShortDescription>
<LongDescription>Class {0} has a circular dependency with other classes</LongDescription>
<Details>
Expand Down Expand Up @@ -5641,7 +5641,7 @@ if (shouldCalcHalting && (calculateHaltingProbability() &gt; 0) { }
<BugCode abbrev="CNC">Collection Naming Confusion</BugCode>
<BugCode abbrev="PME">Poor Mans Enum</BugCode>
<BugCode abbrev="UP">Unused Parameter</BugCode>
<BugCode abbrev="CD">Circular Dependencies</BugCode>
<BugCode abbrev="FCD">Find Circular Dependencies</BugCode>
<BugCode abbrev="MUC">Modifying Unmodifiable Collection</BugCode>
<BugCode abbrev="UJM">Unjitable method</BugCode>
<BugCode abbrev="HES">Hanging ExecutorService</BugCode>
Expand Down
2 changes: 1 addition & 1 deletion htdocs/index.shtml
Expand Up @@ -222,7 +222,7 @@ function toggleBlock(divId, imgId)
Looks for private or static methods that have parameters that aren't used. These parameters
can be removed.
</li>
<li><b>[CD] Circular Dependencies</b><br/>
<li><b>[FCD] Find Circular Dependencies</b><br/>
Looks for class dependencies that where two or more classes rely on each other, either directly or indirectly.
This often signifies an improper data model. Consider using interfaces to break this closed loop.
</li>
Expand Down
4 changes: 2 additions & 2 deletions samples/CD_Sample.java → samples/FCD_Sample.java
@@ -1,5 +1,5 @@

public class CD_Sample {
public class FCD_Sample {
Child c = new Child();;

public void cdTest() {
Expand All @@ -16,7 +16,7 @@ public void childTest() {
}

class SubChild {
CD_Sample cds = new CD_Sample();
FCD_Sample cds = new FCD_Sample();

public void subChildTest() {
cds.toString();
Expand Down
Expand Up @@ -40,7 +40,7 @@
* looks for classes that have dependencies on each other in a circular way. Class initialization can be compromised in this scenario, and usually points to a
* bad data model. Consider using interfaces to break this hard circular dependency.
*/
public class CircularDependencies extends BytecodeScanningDetector {
public class FindCircularDependencies extends BytecodeScanningDetector {
private Map<String, Set<String>> dependencyGraph = null;

private BugReporter bugReporter;
Expand All @@ -53,7 +53,7 @@ public class CircularDependencies extends BytecodeScanningDetector {
* @param bugReporter
* the sync of bug reports
*/
public CircularDependencies(BugReporter bugReporter) {
public FindCircularDependencies(BugReporter bugReporter) {
this.bugReporter = bugReporter;
this.dependencyGraph = new HashMap<String, Set<String>>();
}
Expand Down

0 comments on commit 39a7121

Please sign in to comment.