aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-12-04 21:56:18 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-12-04 22:29:19 +0100
commit0da5d5aca58df54a695c5dacb9dee1b0be180756 (patch)
treef3a0375b65cf6bcacc753867fc19b391c9daef8c /sonar-plugin-api
parent06443d5ca9bd2894dcb796179f3af09babc1aa0d (diff)
downloadsonarqube-0da5d5aca58df54a695c5dacb9dee1b0be180756.tar.gz
sonarqube-0da5d5aca58df54a695c5dacb9dee1b0be180756.zip
Refactor issue indexer (project-agnostic approach)
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/issue/internal/DefaultIssue.java6
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/DefaultIssueTest.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/internal/DefaultIssue.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/internal/DefaultIssue.java
index 48199bb19d0..e0f151ac9d0 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/internal/DefaultIssue.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/internal/DefaultIssue.java
@@ -109,7 +109,7 @@ public class DefaultIssue implements Issue {
private boolean sendNotifications = false;
// Date when issue was loaded from db (only when isNew=false)
- private Date selectedAt;
+ private Long selectedAt;
@Override
public String key() {
@@ -548,11 +548,11 @@ public class DefaultIssue implements Issue {
}
@CheckForNull
- public Date selectedAt() {
+ public Long selectedAt() {
return selectedAt;
}
- public DefaultIssue setSelectedAt(@Nullable Date d) {
+ public DefaultIssue setSelectedAt(@Nullable Long d) {
this.selectedAt = d;
return this;
}
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/DefaultIssueTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/DefaultIssueTest.java
index 4ee5587d843..0f145f0f2c8 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/DefaultIssueTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/DefaultIssueTest.java
@@ -68,7 +68,7 @@ public class DefaultIssueTest {
.setCreationDate(new SimpleDateFormat("yyyy-MM-dd").parse("2013-08-19"))
.setUpdateDate(new SimpleDateFormat("yyyy-MM-dd").parse("2013-08-20"))
.setCloseDate(new SimpleDateFormat("yyyy-MM-dd").parse("2013-08-21"))
- .setSelectedAt(new SimpleDateFormat("yyyy-MM-dd").parse("2013-08-22"))
+ .setSelectedAt(1400000000000L)
;
assertThat(issue.key()).isEqualTo("ABCD");
@@ -98,7 +98,7 @@ public class DefaultIssueTest {
assertThat(issue.creationDate()).isEqualTo(new SimpleDateFormat("yyyy-MM-dd").parse("2013-08-19"));
assertThat(issue.updateDate()).isEqualTo(new SimpleDateFormat("yyyy-MM-dd").parse("2013-08-20"));
assertThat(issue.closeDate()).isEqualTo(new SimpleDateFormat("yyyy-MM-dd").parse("2013-08-21"));
- assertThat(issue.selectedAt()).isEqualTo(new SimpleDateFormat("yyyy-MM-dd").parse("2013-08-22"));
+ assertThat(issue.selectedAt()).isEqualTo(1400000000000L);
}
@Test