From 1a66b2fc17251ef1ae7cd5d221e886d49848804c Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Tue, 9 Dec 2014 16:06:42 +0100 Subject: [PATCH] fix quality flaw --- .../main/java/org/sonar/server/batch/UploadReportAction.java | 5 +---- .../src/test/java/org/sonar/server/batch/BatchWsTest.java | 3 +-- .../java/org/sonar/server/batch/UploadReportActionTest.java | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/UploadReportAction.java b/server/sonar-server/src/main/java/org/sonar/server/batch/UploadReportAction.java index 276b0ce66cc..a50ba5f9729 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/UploadReportAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/batch/UploadReportAction.java @@ -26,7 +26,6 @@ import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; import org.sonar.server.computation.AnalysisReportQueue; import org.sonar.server.computation.AnalysisReportTaskLauncher; -import org.sonar.server.computation.ComputationService; public class UploadReportAction implements RequestHandler { @@ -36,12 +35,10 @@ public class UploadReportAction implements RequestHandler { static final String PARAM_SNAPSHOT = "snapshot"; private final AnalysisReportQueue analysisReportQueue; - private final ComputationService computationService; private final AnalysisReportTaskLauncher analysisTaskLauncher; - public UploadReportAction(AnalysisReportQueue analysisReportQueue, ComputationService computationService, AnalysisReportTaskLauncher analysisTaskLauncher) { + public UploadReportAction(AnalysisReportQueue analysisReportQueue, AnalysisReportTaskLauncher analysisTaskLauncher) { this.analysisReportQueue = analysisReportQueue; - this.computationService = computationService; this.analysisTaskLauncher = analysisTaskLauncher; } diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java index 456393159ec..bf762d18a7a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java @@ -32,7 +32,6 @@ import org.sonar.api.resources.Languages; import org.sonar.core.properties.PropertiesDao; import org.sonar.server.computation.AnalysisReportQueue; import org.sonar.server.computation.AnalysisReportTaskLauncher; -import org.sonar.server.computation.ComputationService; import org.sonar.server.db.DbClient; import org.sonar.server.qualityprofile.QProfileFactory; import org.sonar.server.qualityprofile.QProfileLoader; @@ -66,7 +65,7 @@ public class BatchWsTest { new GlobalReferentialsAction(mock(DbClient.class), mock(PropertiesDao.class)), new ProjectReferentialsAction(mock(DbClient.class), mock(PropertiesDao.class), mock(QProfileFactory.class), mock(QProfileLoader.class), mock(RuleService.class), mock(Languages.class)), - new UploadReportAction(mock(AnalysisReportQueue.class), mock(ComputationService.class), mock(AnalysisReportTaskLauncher.class)))); + new UploadReportAction(mock(AnalysisReportQueue.class), mock(AnalysisReportTaskLauncher.class)))); } @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/UploadReportActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/batch/UploadReportActionTest.java index cd56bdf181e..2c792c94f34 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/UploadReportActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/batch/UploadReportActionTest.java @@ -45,7 +45,7 @@ public class UploadReportActionTest { analysisTaskLauncher = mock(AnalysisReportTaskLauncher.class); queue = mock(AnalysisReportQueue.class); - sut = new UploadReportAction(queue, computationService, analysisTaskLauncher); + sut = new UploadReportAction(queue, analysisTaskLauncher); } @Test -- 2.39.5