]> source.dussan.org Git - sonarqube.git/commitdiff
Remove unused vars
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Thu, 29 Oct 2015 08:17:59 +0000 (09:17 +0100)
committerDuarte Meneses <duarte.meneses@sonarsource.com>
Tue, 3 Nov 2015 09:14:38 +0000 (10:14 +0100)
sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java
sonar-batch/src/main/java/org/sonar/batch/issue/tracking/IssueTransition.java
sonar-batch/src/main/java/org/sonar/batch/issue/tracking/LocalIssueTracking.java
sonar-batch/src/main/java/org/sonar/batch/scm/ScmSensor.java
sonar-batch/src/test/java/org/sonar/batch/index/DefaultIndexTest.java

index c8385f5345a87c8992195e8cdcb8d33eaebf45c8..92cf55036edfb744069d76abaa054ed526e56aae 100644 (file)
@@ -38,7 +38,6 @@ import org.slf4j.LoggerFactory;
 import org.sonar.api.batch.SonarIndex;
 import org.sonar.api.batch.bootstrap.ProjectDefinition;
 import org.sonar.api.batch.fs.internal.DefaultInputModule;
-import org.sonar.api.batch.measure.MetricFinder;
 import org.sonar.api.design.Dependency;
 import org.sonar.api.measures.Measure;
 import org.sonar.api.measures.MeasuresFilter;
@@ -67,7 +66,7 @@ public class DefaultIndex extends SonarIndex {
   private Map<Resource, Bucket> buckets = Maps.newLinkedHashMap();
   private DefaultProjectTree projectTree;
 
-  public DefaultIndex(BatchComponentCache componentCache, DefaultProjectTree projectTree, MetricFinder metricFinder, MeasureCache measureCache) {
+  public DefaultIndex(BatchComponentCache componentCache, DefaultProjectTree projectTree, MeasureCache measureCache) {
     this.componentCache = componentCache;
     this.projectTree = projectTree;
     this.measureCache = measureCache;
index 92d8f949cd136d6489cd8afd4d1c8eaf0601933c..6dcbb685209a48b8ca3507b848574c21770ebbba 100644 (file)
@@ -90,7 +90,7 @@ public class IssueTransition {
 
     List<DefaultIssue> trackedIssues;
     if (localIssueTracking != null) {
-      trackedIssues = localIssueTracking.trackIssues(reader, component, rawIssues);
+      trackedIssues = localIssueTracking.trackIssues(component, rawIssues);
     } else {
       trackedIssues = Lists.newArrayList();
     }
@@ -103,7 +103,7 @@ public class IssueTransition {
       issueCache.put(issue);
     }
   }
-
+  
   private void addUnmatchedRawIssues(BatchComponent component, Set<org.sonar.batch.protocol.output.BatchReport.Issue> rawIssues, List<DefaultIssue> trackedIssues) {
     for (BatchReport.Issue rawIssue : rawIssues) {
 
index 01bdadd560909c88cd2d9ba59419d87f7dc6f22e..5273748a7f41673bf3b0e33d4e48ab86ddca6925 100644 (file)
@@ -38,7 +38,6 @@ import org.sonar.api.rule.RuleKey;
 import org.sonar.batch.index.BatchComponent;
 import org.sonar.batch.index.BatchComponentCache;
 import org.sonar.batch.protocol.output.BatchReport;
-import org.sonar.batch.protocol.output.BatchReportReader;
 import org.sonar.batch.report.ReportPublisher;
 import org.sonar.batch.repository.ProjectRepositories;
 import org.sonar.core.component.ComponentKeys;
@@ -76,7 +75,7 @@ public class LocalIssueTracking {
     }
   }
 
-  public List<DefaultIssue> trackIssues(BatchReportReader reader, BatchComponent component, Set<BatchReport.Issue> rawIssues) {
+  public List<DefaultIssue> trackIssues(BatchComponent component, Set<BatchReport.Issue> rawIssues) {
     List<DefaultIssue> trackedIssues = Lists.newArrayList();
     if (hasServerAnalysis) {
 
index d0111c2c91ad1cb5d040faab8a9f2db141f1df20..b7d58cb14faae1b5cea27710ce4c2a92a4c50f73 100644 (file)
@@ -36,7 +36,6 @@ import org.sonar.batch.index.BatchComponentCache;
 import org.sonar.batch.report.ReportPublisher;
 import org.sonar.batch.repository.FileData;
 import org.sonar.batch.repository.ProjectRepositories;
-import org.sonar.batch.scan.filesystem.InputPathCache;
 
 public final class ScmSensor implements Sensor {
 
@@ -50,8 +49,7 @@ public final class ScmSensor implements Sensor {
   private final ReportPublisher publishReportJob;
 
   public ScmSensor(ProjectDefinition projectDefinition, ScmConfiguration configuration,
-    ProjectRepositories projectRepositories, FileSystem fs, InputPathCache inputPathCache, BatchComponentCache resourceCache,
-    ReportPublisher publishReportJob) {
+    ProjectRepositories projectRepositories, FileSystem fs, BatchComponentCache resourceCache, ReportPublisher publishReportJob) {
     this.projectDefinition = projectDefinition;
     this.configuration = configuration;
     this.projectRepositories = projectRepositories;
index d98cd10efeb6ea247fc2a0a958cfaead4158c2f2..c18ce10a540601613b917d6ca4d9781558ba637a 100644 (file)
@@ -25,8 +25,6 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 import org.sonar.api.batch.bootstrap.ProjectDefinition;
-import org.sonar.api.batch.measure.MetricFinder;
-import org.sonar.api.measures.CoreMetrics;
 import org.sonar.api.measures.Measure;
 import org.sonar.api.measures.MeasuresFilters;
 import org.sonar.api.profiles.RulesProfile;
@@ -62,13 +60,11 @@ public class DefaultIndexTest {
 
   @Before
   public void createIndex() throws IOException {
-    MetricFinder metricFinder = mock(MetricFinder.class);
-    when(metricFinder.findByKey("ncloc")).thenReturn(CoreMetrics.NCLOC);
     ruleFinder = mock(RuleFinder.class);
 
     DefaultProjectTree projectTree = mock(DefaultProjectTree.class);
     BatchComponentCache resourceCache = new BatchComponentCache();
-    index = new DefaultIndex(resourceCache, projectTree, metricFinder, mock(MeasureCache.class));
+    index = new DefaultIndex(resourceCache, projectTree, mock(MeasureCache.class));
 
     baseDir = temp.newFolder();
     project = new Project("project");