aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-squid-java-plugin
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-05-29 01:24:07 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-05-29 03:09:39 +0400
commita44965f6bdee2dcb6b96b7a0cae1ef2a1f8604c9 (patch)
tree4453364397808b7caad6842e56e63a9c4d9fb0df /plugins/sonar-squid-java-plugin
parent42e6f9118e856f010e4c3bd301f7435ec71d5399 (diff)
downloadsonarqube-a44965f6bdee2dcb6b96b7a0cae1ef2a1f8604c9.tar.gz
sonarqube-a44965f6bdee2dcb6b96b7a0cae1ef2a1f8604c9.zip
Fix violations
Diffstat (limited to 'plugins/sonar-squid-java-plugin')
-rw-r--r--plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ChidamberKemererDistributionBuilder.java4
-rw-r--r--plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilder.java5
2 files changed, 4 insertions, 5 deletions
diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ChidamberKemererDistributionBuilder.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ChidamberKemererDistributionBuilder.java
index 0dac2438e65..202395145e9 100644
--- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ChidamberKemererDistributionBuilder.java
+++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ChidamberKemererDistributionBuilder.java
@@ -34,8 +34,8 @@ import org.sonar.api.resources.Scopes;
public final class ChidamberKemererDistributionBuilder implements Decorator {
- public static final Integer[] LCOM4_LIMITS = {2, 3, 4, 5, 10};// 1 is excluded
- public static final Integer[] RFC_LIMITS = {0, 5, 10, 20, 30, 50, 90, 150};
+ private static final Integer[] LCOM4_LIMITS = { 2, 3, 4, 5, 10 }; // 1 is excluded
+ private static final Integer[] RFC_LIMITS = { 0, 5, 10, 20, 30, 50, 90, 150 };
@DependedUpon
public Metric generatesLcom4Distribution() {
diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilder.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilder.java
index 6b9477ba720..e60ccad8d6e 100644
--- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilder.java
+++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilder.java
@@ -35,7 +35,7 @@ import org.sonar.java.api.JavaMethod;
*/
public final class FunctionComplexityDistributionBuilder implements Decorator {
- public static final Number[] LIMITS = {1, 2, 4, 6, 8, 10, 12};
+ private static final Number[] LIMITS = { 1, 2, 4, 6, 8, 10, 12 };
@DependsUpon
public Metric dependOnComplexity() {
@@ -52,7 +52,7 @@ public final class FunctionComplexityDistributionBuilder implements Decorator {
RangeDistributionBuilder builder = new RangeDistributionBuilder(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION, LIMITS);
for (DecoratorContext childContext : context.getChildren()) {
if (childContext.getResource() instanceof JavaMethod) {
- JavaMethod javaMethod = (JavaMethod)childContext.getResource();
+ JavaMethod javaMethod = (JavaMethod) childContext.getResource();
Measure complexity = childContext.getMeasure(CoreMetrics.COMPLEXITY);
if (!javaMethod.isAccessor() && complexity != null) {
builder.add(complexity.getValue());
@@ -73,4 +73,3 @@ public final class FunctionComplexityDistributionBuilder implements Decorator {
return Java.KEY.equals(project.getLanguageKey());
}
}
-