aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-01-15 17:34:58 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2015-01-15 17:38:48 +0100
commita42dd4d2b9d0eafe67bd514d56f0ab4ffc8ddbea (patch)
treefa56c9bb648c22956256f0eea104241765a9f089
parent1899835d7772f9930f5f997e0b665a8c02e404fa (diff)
downloadsonarqube-a42dd4d2b9d0eafe67bd514d56f0ab4ffc8ddbea.tar.gz
sonarqube-a42dd4d2b9d0eafe67bd514d56f0ab4ffc8ddbea.zip
SONAR-5931 Cleanup
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java3
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java3
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan/SensorWrapper.java3
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan2/IssueCache.java58
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan2/SensorsExecutor.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/sensor/AnalyzerOptimizer.java (renamed from sonar-batch/src/main/java/org/sonar/batch/scan2/AnalyzerOptimizer.java)2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java3
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/sensor/AnalyzerOptimizerTest.java (renamed from sonar-batch/src/test/java/org/sonar/batch/scan2/AnalyzerOptimizerTest.java)2
8 files changed, 12 insertions, 64 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java
index e0a0e348514..37cb0c5aa69 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java
@@ -19,6 +19,8 @@
*/
package org.sonar.batch.bootstrap;
+import org.sonar.batch.sensor.AnalyzerOptimizer;
+
import com.google.common.collect.Lists;
import org.apache.commons.lang.ClassUtils;
import org.sonar.api.batch.CheckProject;
@@ -28,7 +30,6 @@ import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.platform.ComponentContainer;
import org.sonar.api.resources.Project;
import org.sonar.batch.scan.SensorWrapper;
-import org.sonar.batch.scan2.AnalyzerOptimizer;
import org.sonar.batch.sensor.DefaultSensorContext;
import javax.annotation.Nullable;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java b/sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java
index a7af5621465..a2d9f3a165f 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java
@@ -19,6 +19,8 @@
*/
package org.sonar.batch.scan;
+import org.sonar.batch.sensor.AnalyzerOptimizer;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.BatchComponent;
@@ -95,7 +97,6 @@ import org.sonar.batch.scan.filesystem.ProjectFileSystemAdapter;
import org.sonar.batch.scan.filesystem.StatusDetectionFactory;
import org.sonar.batch.scan.maven.MavenPluginsConfigurator;
import org.sonar.batch.scan.report.JsonReport;
-import org.sonar.batch.scan2.AnalyzerOptimizer;
import org.sonar.batch.sensor.DefaultSensorContext;
import org.sonar.batch.sensor.DefaultSensorStorage;
import org.sonar.batch.sensor.coverage.CoverageExclusions;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/SensorWrapper.java b/sonar-batch/src/main/java/org/sonar/batch/scan/SensorWrapper.java
index c316078f714..8884bef521f 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan/SensorWrapper.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan/SensorWrapper.java
@@ -19,13 +19,14 @@
*/
package org.sonar.batch.scan;
+import org.sonar.batch.sensor.AnalyzerOptimizer;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.batch.sensor.Sensor;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.internal.DefaultSensorDescriptor;
import org.sonar.api.resources.Project;
-import org.sonar.batch.scan2.AnalyzerOptimizer;
public class SensorWrapper implements org.sonar.api.batch.Sensor {
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan2/IssueCache.java b/sonar-batch/src/main/java/org/sonar/batch/scan2/IssueCache.java
deleted file mode 100644
index 5de18c1b8c3..00000000000
--- a/sonar-batch/src/main/java/org/sonar/batch/scan2/IssueCache.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.batch.scan2;
-
-import org.sonar.api.BatchComponent;
-import org.sonar.api.batch.sensor.issue.internal.DefaultIssue;
-import org.sonar.batch.index.Cache;
-import org.sonar.batch.index.Caches;
-import org.sonar.batch.scan.filesystem.InputPathCache;
-
-/**
- * Shared issues among all project modules
- */
-public class IssueCache implements BatchComponent {
-
- // project key -> resource key -> issue key -> issue
- private final Cache<DefaultIssue> cache;
-
- public IssueCache(Caches caches, InputPathCache inputPathCache) {
- caches.registerValueCoder(DefaultIssue.class, new DefaultIssueValueCoder(inputPathCache));
- cache = caches.createCache("issues");
- }
-
- public Iterable<DefaultIssue> byComponent(String projectKey, String resourceKey) {
- return cache.values(projectKey, resourceKey);
- }
-
- public Iterable<DefaultIssue> all() {
- return cache.values();
- }
-
- public IssueCache put(String projectKey, String resourceKey, DefaultIssue issue) {
- cache.put(projectKey, resourceKey, issue.key(), issue);
- return this;
- }
-
- public Iterable<DefaultIssue> byModule(String projectKey) {
- return cache.values(projectKey);
- }
-
-}
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan2/SensorsExecutor.java b/sonar-batch/src/main/java/org/sonar/batch/scan2/SensorsExecutor.java
index ea872c4c1bf..dc68e4d41f4 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan2/SensorsExecutor.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan2/SensorsExecutor.java
@@ -19,6 +19,8 @@
*/
package org.sonar.batch.scan2;
+import org.sonar.batch.sensor.AnalyzerOptimizer;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.BatchComponent;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan2/AnalyzerOptimizer.java b/sonar-batch/src/main/java/org/sonar/batch/sensor/AnalyzerOptimizer.java
index c149a7aea15..ed085a73db9 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan2/AnalyzerOptimizer.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/sensor/AnalyzerOptimizer.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.batch.scan2;
+package org.sonar.batch.sensor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java
index 1509a65ffea..f6979d924c6 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java
@@ -19,12 +19,13 @@
*/
package org.sonar.batch.bootstrap;
+import org.sonar.batch.sensor.AnalyzerOptimizer;
+
import org.junit.Test;
import org.sonar.api.BatchExtension;
import org.sonar.api.batch.Sensor;
import org.sonar.api.platform.ComponentContainer;
import org.sonar.api.resources.Project;
-import org.sonar.batch.scan2.AnalyzerOptimizer;
import org.sonar.batch.sensor.DefaultSensorContext;
import java.util.Collection;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan2/AnalyzerOptimizerTest.java b/sonar-batch/src/test/java/org/sonar/batch/sensor/AnalyzerOptimizerTest.java
index b056715e260..fb8e564f11d 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/scan2/AnalyzerOptimizerTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/sensor/AnalyzerOptimizerTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.batch.scan2;
+package org.sonar.batch.sensor;
import org.junit.Before;
import org.junit.Rule;