Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2012-01-12 22:28:59 +0000
committerKevin Sawicki2012-01-12 22:28:59 +0000
commit55a869ef5ac43b805439646f9dce550224cc7ca8 (patch)
tree513d1a30584229de7571ad4f396f5ff8531476c7
parentb429472a5d128ac95aa3618e1db759225ddcb45b (diff)
downloadegit-github-55a869ef5ac43b805439646f9dce550224cc7ca8.tar.gz
egit-github-55a869ef5ac43b805439646f9dce550224cc7ca8.tar.xz
egit-github-55a869ef5ac43b805439646f9dce550224cc7ca8.zip
Add missing id field to Event model class
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/EventTest.java2
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/event/Event.java18
2 files changed, 20 insertions, 0 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/EventTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/EventTest.java
index 563c2f4e..c1a6ab7e 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/EventTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/EventTest.java
@@ -41,6 +41,7 @@ public class EventTest {
assertNull(event.getOrg());
assertNull(event.getCreatedAt());
assertFalse(event.isPublic());
+ assertNull(event.getId());
}
/**
@@ -61,6 +62,7 @@ public class EventTest {
assertEquals(new Date(5000), event.setCreatedAt(new Date(5000))
.getCreatedAt());
assertTrue(event.setPublic(true).isPublic());
+ assertEquals("123", event.setId("123").getId());
}
/**
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/event/Event.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/event/Event.java
index b68429ff..4d1904e9 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/event/Event.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/event/Event.java
@@ -38,6 +38,8 @@ public class Event implements Serializable {
private EventRepository repo;
+ private String id;
+
private User actor;
private User org;
@@ -155,4 +157,20 @@ public class Event implements Serializable {
this.payload = payload;
return this;
}
+
+ /**
+ * @return id
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * @param id
+ * @return this event
+ */
+ public Event setId(String id) {
+ this.id = id;
+ return this;
+ }
}

Back to the top