aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-05-03 23:41:09 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-05-03 23:41:09 +0200
commitc9a8ffa209eee86a051cab32989b8d948572839c (patch)
treefafa9dbcb77fcb0c4322887b7bf0ff00b945ae35 /sonar-ws-client
parent02f85f98608fdf03a880025768c2d576ae9a88d4 (diff)
downloadsonarqube-c9a8ffa209eee86a051cab32989b8d948572839c.tar.gz
sonarqube-c9a8ffa209eee86a051cab32989b8d948572839c.zip
SONAR-3755 remove the resolution OPEN
Diffstat (limited to 'sonar-ws-client')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java18
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/issue/NewIssueTest.java2
2 files changed, 19 insertions, 1 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java
index 62929609cd9..d22ed22afbb 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java
@@ -21,6 +21,7 @@ package org.sonar.wsclient.issue;
import org.sonar.wsclient.unmarshallers.JsonUtils;
+import javax.annotation.CheckForNull;
import java.util.Collections;
import java.util.Date;
import java.util.Map;
@@ -55,10 +56,12 @@ public class Issue {
return JsonUtils.getString(json, "severity");
}
+ @CheckForNull
public String description() {
return JsonUtils.getString(json, "desc");
}
+ @CheckForNull
public Integer line() {
return JsonUtils.getInteger(json, "line");
}
@@ -68,6 +71,7 @@ public class Issue {
return JsonUtils.getDouble(json, "effortToFix");
}
+ @CheckForNull
public Double effortToFix() {
return JsonUtils.getDouble(json, "effortToFix");
}
@@ -76,14 +80,26 @@ public class Issue {
return JsonUtils.getString(json, "status");
}
+ /**
+ * The resolution type. Null if the issue is not resolved.
+ */
+ @CheckForNull
public String resolution() {
return JsonUtils.getString(json, "resolution");
}
+ /**
+ * Login of the user who created the manual issue, else null.
+ */
+ @CheckForNull
public String userLogin() {
return JsonUtils.getString(json, "userLogin");
}
+ /**
+ * Login of assignee. Null if issue is not assigned.
+ */
+ @CheckForNull
public String assignee() {
return JsonUtils.getString(json, "assignee");
}
@@ -96,10 +112,12 @@ public class Issue {
return JsonUtils.getDateTime(json, "updateDate");
}
+ @CheckForNull
public Date closeDate() {
return JsonUtils.getDateTime(json, "closeDate");
}
+ @CheckForNull
public String attribute(String key) {
return attributes().get(key);
}
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/NewIssueTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/NewIssueTest.java
index f544c9ed0c9..a6e2e9d7d40 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/NewIssueTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/NewIssueTest.java
@@ -43,7 +43,7 @@ public class NewIssueTest {
assertThat(newIssue.urlParams()).hasSize(7).includes(
entry("component", "Action.java"),
- entry("cost", 4.2),
+ entry("effortToFix", 4.2),
entry("desc", "the desc"),
entry("line", 123),
entry("rule", "squid:AvoidCycle"),