summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Trutz2011-05-09 18:58:08 (EDT)
committerChristian Trutz2011-05-09 18:58:08 (EDT)
commit6d072766314c5371500062459ab41d844e2f86dd (patch)
tree0d103457f328a5adba812eb9fc8188536f783ec7
parentf4ac39b90e9b8fb341b7063ddbfd1d8f316ea190 (diff)
downloadegit-github-6d072766314c5371500062459ab41d844e2f86dd.zip
egit-github-6d072766314c5371500062459ab41d844e2f86dd.tar.gz
egit-github-6d072766314c5371500062459ab41d844e2f86dd.tar.bz2
Prevent null pointer exceptions on date getter methods.refs/changes/71/3371/1
Change-Id: I68f611e4e8b064ce72d52b73870116d97a1e2870 Signed-off-by: Christian Trutz <christian.trutz@gmail.com>
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Comment.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Comment.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Comment.java
index cabb24d..d62e0cd 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Comment.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Comment.java
@@ -33,18 +33,16 @@ public class Comment {
* @return createdAt
*/
public Date getCreatedAt() {
- // see EI_EXPOSE_REP at
- // http://findbugs.sourceforge.net/bugDescriptions.html
- return new Date(this.createdAt.getTime());
+ return this.createdAt != null ? new Date(this.createdAt.getTime())
+ : null;
}
/**
* @return updatedAt
*/
public Date getUpdatedAt() {
- // see EI_EXPOSE_REP at
- // http://findbugs.sourceforge.net/bugDescriptions.html
- return new Date(this.updatedAt.getTime());
+ return this.updatedAt != null ? new Date(this.updatedAt.getTime())
+ : null;
}
/**