aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-01-03 17:17:41 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-01-03 17:17:41 +0100
commit6cfd531766b90df62d7ed1eb9ecb0c9172c92007 (patch)
treeaf2647ece28d36eda16c481ccd6beeecc32d7d6a /sonar-ws-client
parent8e2428ab161d64964e65e434ac785222a0163bc9 (diff)
downloadsonarqube-6cfd531766b90df62d7ed1eb9ecb0c9172c92007.tar.gz
sonarqube-6cfd531766b90df62d7ed1eb9ecb0c9172c92007.zip
SONAR-4776 Fix WS and UI due to introduction of issue change creation date
Diffstat (limited to 'sonar-ws-client')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueChange.java4
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChange.java8
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java12
3 files changed, 7 insertions, 17 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueChange.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueChange.java
index d7fb2f8afc8..01cca570c7f 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueChange.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueChange.java
@@ -29,9 +29,7 @@ public interface IssueChange {
String user();
- Date createdAt();
-
- Date updatedAt();
+ Date creationDate();
List<IssueChangeDiff> diffs();
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChange.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChange.java
index 382cb5d6835..325933a1640 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChange.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChange.java
@@ -43,12 +43,8 @@ public class DefaultIssueChange implements IssueChange {
return JsonUtils.getString(json, "user");
}
- public Date createdAt() {
- return JsonUtils.getDateTime(json, "createdAt");
- }
-
- public Date updatedAt() {
- return JsonUtils.getDateTime(json, "updatedAt");
+ public Date creationDate() {
+ return JsonUtils.getDateTime(json, "creationDate");
}
public List<IssueChangeDiff> diffs() {
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java
index 461268d8fbc..795431389a3 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java
@@ -217,8 +217,7 @@ public class IssueJsonParserTest {
assertThat(changes).hasSize(2);
IssueChange change1 = changes.get(0);
assertThat(change1.user()).isEqualTo("julien");
- assertThat(change1.createdAt().getTime()).isEqualTo(1383202235000l);
- assertThat(change1.updatedAt().getTime()).isEqualTo(1383202235000l);
+ assertThat(change1.creationDate().getTime()).isEqualTo(1383202235000l);
assertThat(change1.diffs()).hasSize(1);
IssueChangeDiff diffChange1 = change1.diffs().get(0);
assertThat(diffChange1.key()).isEqualTo("actionPlan");
@@ -227,8 +226,7 @@ public class IssueJsonParserTest {
IssueChange change2 = changes.get(1);
assertThat(change2.user()).isEqualTo("simon");
- assertThat(change2.createdAt().getTime()).isEqualTo(1383202239000l);
- assertThat(change2.updatedAt().getTime()).isEqualTo(1383202239000l);
+ assertThat(change2.creationDate().getTime()).isEqualTo(1383202239000l);
assertThat(change2.diffs()).hasSize(2);
IssueChangeDiff diff1Change2 = change2.diffs().get(0);
assertThat(diff1Change2.key()).isEqualTo("severity");
@@ -248,8 +246,7 @@ public class IssueJsonParserTest {
assertThat(changes).hasSize(1);
IssueChange change = changes.get(0);
assertThat(change.user()).isEqualTo("julien");
- assertThat(change.createdAt().getTime()).isEqualTo(1383202235000l);
- assertThat(change.updatedAt().getTime()).isEqualTo(1383202235000l);
+ assertThat(change.creationDate().getTime()).isEqualTo(1383202235000l);
assertThat(change.diffs()).hasSize(1);
IssueChangeDiff changeDiff = change.diffs().get(0);
@@ -274,8 +271,7 @@ public class IssueJsonParserTest {
assertThat(changes).hasSize(1);
IssueChange change = changes.get(0);
assertThat(change.user()).isEqualTo("julien");
- assertThat(change.createdAt().getTime()).isEqualTo(1383202235000l);
- assertThat(change.updatedAt().getTime()).isEqualTo(1383202235000l);
+ assertThat(change.creationDate().getTime()).isEqualTo(1383202235000l);
assertThat(change.diffs()).hasSize(1);
IssueChangeDiff changeDiff = change.diffs().get(0);