aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client/src/main/java
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-06-05 10:37:39 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-06-05 10:37:39 +0200
commitc57dc71e4d5106a94cb9fba6b55dcaa665a63547 (patch)
tree0ac7b3e945a2b3dd5a0563b4588b1b98fc1d50ea /sonar-ws-client/src/main/java
parent9337b5d4cf54a6e3601a63022d26f8e27c7110a5 (diff)
downloadsonarqube-c57dc71e4d5106a94cb9fba6b55dcaa665a63547.tar.gz
sonarqube-c57dc71e4d5106a94cb9fba6b55dcaa665a63547.zip
SONAR-3755 Set deadLine as Date instead of String in action plan Client
Diffstat (limited to 'sonar-ws-client/src/main/java')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewActionPlan.java11
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/issue/UpdateActionPlan.java11
2 files changed, 10 insertions, 12 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewActionPlan.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewActionPlan.java
index 4b9460f44bd..74c92acbfe8 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewActionPlan.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewActionPlan.java
@@ -19,6 +19,9 @@
*/
package org.sonar.wsclient.issue;
+import org.sonar.wsclient.internal.EncodingUtils;
+
+import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -28,7 +31,6 @@ import java.util.Map;
public class NewActionPlan {
static final String BASE_URL = "/api/action_plans/create";
-
private final Map<String, Object> params = new HashMap<String, Object>();
private NewActionPlan() {
@@ -57,11 +59,8 @@ public class NewActionPlan {
return this;
}
- /**
- * Due date of the action plan. Format is 'day/month/year', for instance, '31/12/2013'.
- */
- public NewActionPlan deadLine(String s) {
- params.put("deadLine", s);
+ public NewActionPlan deadLine(Date deadLine) {
+ params.put("deadLine", EncodingUtils.toQueryParam(deadLine, false));
return this;
}
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/UpdateActionPlan.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/UpdateActionPlan.java
index 8914e898fce..2ca316217b3 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/UpdateActionPlan.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/UpdateActionPlan.java
@@ -19,6 +19,9 @@
*/
package org.sonar.wsclient.issue;
+import org.sonar.wsclient.internal.EncodingUtils;
+
+import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -28,7 +31,6 @@ import java.util.Map;
public class UpdateActionPlan {
static final String BASE_URL = "/api/action_plans/update";
-
private final Map<String, Object> params = new HashMap<String, Object>();
private UpdateActionPlan() {
@@ -57,11 +59,8 @@ public class UpdateActionPlan {
return this;
}
- /**
- * Due date of the action plan. Format is 'day/month/year', for instance, '31/12/2013'.
- */
- public UpdateActionPlan deadLine(String s) {
- params.put("deadLine", s);
+ public UpdateActionPlan deadLine(Date deadLine) {
+ params.put("deadLine", EncodingUtils.toQueryParam(deadLine, false));
return this;
}