summaryrefslogtreecommitdiffstats
path: root/sonar-squid/src/main
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 /sonar-squid/src/main
parent42e6f9118e856f010e4c3bd301f7435ec71d5399 (diff)
downloadsonarqube-a44965f6bdee2dcb6b96b7a0cae1ef2a1f8604c9.tar.gz
sonarqube-a44965f6bdee2dcb6b96b7a0cae1ef2a1f8604c9.zip
Fix violations
Diffstat (limited to 'sonar-squid/src/main')
-rw-r--r--sonar-squid/src/main/java/org/sonar/squid/Squid.java25
-rw-r--r--sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java7
2 files changed, 15 insertions, 17 deletions
diff --git a/sonar-squid/src/main/java/org/sonar/squid/Squid.java b/sonar-squid/src/main/java/org/sonar/squid/Squid.java
index 1702f6f23dd..b2153e25ef0 100644
--- a/sonar-squid/src/main/java/org/sonar/squid/Squid.java
+++ b/sonar-squid/src/main/java/org/sonar/squid/Squid.java
@@ -20,28 +20,20 @@
package org.sonar.squid;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
import org.picocontainer.MutablePicoContainer;
import org.picocontainer.containers.TransientPicoContainer;
import org.sonar.graph.DirectedGraph;
import org.sonar.graph.DirectedGraphAccessor;
-import org.sonar.squid.api.CodeScanner;
-import org.sonar.squid.api.CodeVisitor;
-import org.sonar.squid.api.Query;
-import org.sonar.squid.api.SourceCode;
-import org.sonar.squid.api.SourceCodeEdge;
-import org.sonar.squid.api.SourceCodeSearchEngine;
-import org.sonar.squid.api.SourceCodeTreeDecorator;
-import org.sonar.squid.api.SourceProject;
-import org.sonar.squid.api.SquidConfiguration;
+import org.sonar.squid.api.*;
import org.sonar.squid.indexer.SquidIndex;
import org.sonar.squid.measures.Metric;
import org.sonar.squid.measures.MetricDef;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
public class Squid implements DirectedGraphAccessor<SourceCode, SourceCodeEdge>, SourceCodeSearchEngine {
private MutablePicoContainer pico;
@@ -79,7 +71,7 @@ public class Squid implements DirectedGraphAccessor<SourceCode, SourceCodeEdge>,
SCANNER scanner = pico.getComponent(scannerClass);
for (Object clazz : scanner.getVisitorClasses()) {
addToPicocontainer((Class) clazz);
- scanner.accept(pico.<CodeVisitor>getComponent((Class) clazz));
+ scanner.accept(pico.<CodeVisitor> getComponent((Class) clazz));
}
for (CodeVisitor externalVisitor : externalCodeVisitors) {
scanner.accept(externalVisitor);
@@ -87,6 +79,9 @@ public class Squid implements DirectedGraphAccessor<SourceCode, SourceCodeEdge>,
return scanner;
}
+ /**
+ * @deprecated use {@link #decorateSourceCodeTreeWith(MetricDef...)} instead
+ */
@Deprecated
public SourceProject aggregate() {
return decorateSourceCodeTreeWith(Metric.values());
diff --git a/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java b/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java
index 4afdc7196e6..cdc74381c2a 100644
--- a/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java
+++ b/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java
@@ -34,10 +34,13 @@ public class QueryByMeasure implements Query {
public enum Operator {
GREATER_THAN, EQUALS, GREATER_THAN_EQUALS, LESS_THAN, LESS_THAN_EQUALS
}
-
+
+ /**
+ * @deprecated use {@link #QueryByMeasure(MetricDef, Operator, double)} instead
+ */
@Deprecated
public QueryByMeasure(Metric metric, Operator operator, double value) {
- this((MetricDef)metric, operator, value);
+ this((MetricDef) metric, operator, value);
}
public QueryByMeasure(MetricDef metric, Operator operator, double value) {