aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-02-08 09:31:48 +0100
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-02-08 09:31:48 +0100
commitb16866d9262240e4b0668f2c91cb187b65d88a76 (patch)
treeedc8f66f80e0c3df124d13f44de74fb9cb99659d /server
parent035f7bdfe2b9bf7992ccd4fed456de98d007b305 (diff)
downloadsonarqube-b16866d9262240e4b0668f2c91cb187b65d88a76.tar.gz
sonarqube-b16866d9262240e4b0668f2c91cb187b65d88a76.zip
Fix quality flaw
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/AppAction.java6
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/AppActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesWsTest.java3
3 files changed, 3 insertions, 8 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/AppAction.java b/server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/AppAction.java
index fcbed4cfc72..81e5ec071ab 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/AppAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/AppAction.java
@@ -25,18 +25,14 @@ import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.utils.text.JsonWriter;
-import org.sonar.core.timemachine.Periods;
import org.sonar.server.qualitygate.QualityGates;
public class AppAction implements QGateWsAction {
private final QualityGates qualityGates;
- private final Periods periods;
-
- public AppAction(QualityGates qualityGates, Periods periods) {
+ public AppAction(QualityGates qualityGates) {
this.qualityGates = qualityGates;
- this.periods = periods;
}
@Override
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/AppActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/AppActionTest.java
index b02c7e783e6..cec59426d92 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/AppActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/AppActionTest.java
@@ -67,7 +67,7 @@ public class AppActionTest {
new CreateAction(qGates), new CopyAction(qGates), new DestroyAction(qGates), new RenameAction(qGates),
new SetAsDefaultAction(qGates), new UnsetDefaultAction(qGates),
new CreateConditionAction(qGates), new UpdateConditionAction(qGates), new DeleteConditionAction(qGates),
- new SelectAction(qGates), new DeselectAction(qGates), new AppAction(qGates, periods)));
+ new SelectAction(qGates), new DeselectAction(qGates), new AppAction(qGates)));
}
@Test
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesWsTest.java
index 448b09e7281..39fb85de5e9 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesWsTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesWsTest.java
@@ -33,7 +33,6 @@ import org.sonar.db.qualitygate.ProjectQgateAssociation;
import org.sonar.db.qualitygate.ProjectQgateAssociationQuery;
import org.sonar.db.qualitygate.QualityGateConditionDto;
import org.sonar.db.qualitygate.QualityGateDto;
-import org.sonar.core.timemachine.Periods;
import org.sonar.server.exceptions.BadRequestException;
import org.sonar.server.qualitygate.QgateProjectFinder;
import org.sonar.server.qualitygate.QgateProjectFinder.Association;
@@ -70,7 +69,7 @@ public class QGatesWsTest {
new CreateAction(qGates), new CopyAction(qGates), new DestroyAction(qGates), new RenameAction(qGates),
new SetAsDefaultAction(qGates), new UnsetDefaultAction(qGates),
new CreateConditionAction(qGates), new UpdateConditionAction(qGates), new DeleteConditionAction(qGates),
- new SelectAction(qGates), new DeselectAction(qGates), new AppAction(qGates, mock(Periods.class))));
+ new SelectAction(qGates), new DeselectAction(qGates), new AppAction(qGates)));
}
@Test