summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Tsay2012-01-05 19:25:47 (EST)
committer Kevin Sawicki2012-01-05 19:25:47 (EST)
commite270b86caa90a29fb9267bc2f0b2d4c65748fabc (patch)
tree9ea3c4b9d8a05aa54895f2e3e6502b53b4d0789e
parent77a95f0bf4207eb4d31a2314981f9d135d18e565 (diff)
downloadegit-github-e270b86caa90a29fb9267bc2f0b2d4c65748fabc.zip
egit-github-e270b86caa90a29fb9267bc2f0b2d4c65748fabc.tar.gz
egit-github-e270b86caa90a29fb9267bc2f0b2d4c65748fabc.tar.bz2
Add missing id field to Issue model classrefs/changes/26/4926/2
Change-Id: I76193b1577fce7ed86ba4bf04007d103d9ae48f6 Signed-off-by: Kevin Sawicki <kevin@github.com>
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/IssueTest.java2
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Issue.java18
2 files changed, 20 insertions, 0 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/IssueTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/IssueTest.java
index a7ba3cd..58b31d6 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/IssueTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/IssueTest.java
@@ -54,6 +54,7 @@ public class IssueTest {
assertNull(issue.getUrl());
assertNull(issue.getUser());
assertNotNull(issue.toString());
+ assertEquals(0, issue.getId());
}
/**
@@ -88,6 +89,7 @@ public class IssueTest {
User user = new User().setLogin("user");
assertEquals(user, issue.setUser(user).getUser());
assertNull(issue.setLabels(null).getLabels());
+ assertEquals(39, issue.setId(39).getId());
}
/**
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Issue.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Issue.java
index 68bef6a..e927642 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Issue.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Issue.java
@@ -25,6 +25,8 @@ public class Issue implements Serializable {
/** serialVersionUID */
private static final long serialVersionUID = 6358575015023539051L;
+ private long id;
+
private Date closedAt;
private Date createdAt;
@@ -331,6 +333,22 @@ public class Issue implements Serializable {
return this;
}
+ /**
+ * @return id
+ */
+ public long getId() {
+ return id;
+ }
+
+ /**
+ * @param id
+ * @return this issue
+ */
+ public Issue setId(long id) {
+ this.id = id;
+ return this;
+ }
+
@Override
public String toString() {
return "Issue " + number; //$NON-NLS-1$