pmd: fixed #1060 GodClassRule >>> wrong method
This commit is contained in:
parent
e3708b5030
commit
7989ae1863
@ -6,6 +6,7 @@ Fixed bug 1043: node.getEndLine() always returns 0 (ECMAscript)
|
||||
Fixed bug 1044: Unknown option: -excludemarker
|
||||
Fixed bug 1047: False Positive in 'for' loops for LocalVariableCouldBeFinal in 5.0.1
|
||||
Fixed bug 1048: CommentContent Rule, String Index out of range Exception
|
||||
Fixed bug 1060: GodClassRule >>> wrong method
|
||||
|
||||
November 28, 2012 - 5.0.1:
|
||||
|
||||
|
@ -154,9 +154,10 @@ public class GodClassRule extends AbstractJavaRule {
|
||||
int pairs = 0;
|
||||
|
||||
if (methodCount > 1) {
|
||||
for (int i = 0; i < methodCount - 1; i++) {
|
||||
for (int i = 0; i < methodCount; i++) {
|
||||
for (int j = i + 1; j < methodCount; j++) {
|
||||
String firstMethodName = methods.get(i);
|
||||
String secondMethodName = methods.get(i + 1);
|
||||
String secondMethodName = methods.get(j);
|
||||
Set<String> accessesOfFirstMethod = methodAttributeAccess.get(firstMethodName);
|
||||
Set<String> accessesOfSecondMethod = methodAttributeAccess.get(secondMethodName);
|
||||
Set<String> combinedAccesses = new HashSet<String>();
|
||||
@ -169,6 +170,7 @@ public class GodClassRule extends AbstractJavaRule {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return pairs;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
package net.sourceforge.pmd.lang.java.rule.design;
|
||||
|
||||
import net.sourceforge.pmd.testframework.SimpleAggregatorTst;
|
||||
|
Loading…
x
Reference in New Issue
Block a user