]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaw
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Mon, 8 Feb 2016 08:31:48 +0000 (09:31 +0100)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Mon, 8 Feb 2016 08:31:48 +0000 (09:31 +0100)
server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/AppAction.java
server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/AppActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesWsTest.java

index fcbed4cfc726a3eba23dc2aedfe4c049559eda1b..81e5ec071abcff79be7ea90603ade1a0746712ae 100644 (file)
@@ -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
index b02c7e783e620cede85faa610294eb4a2a1475b6..cec59426d92ee9159da1e7deff446b0159859f90 100644 (file)
@@ -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
index 448b09e72816e01822c0fc7cda06d9fba8ee2ddf..39fb85de5e969033fb05325120a89ae149b3790b 100644 (file)
@@ -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