Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Trutz2011-05-09 22:58:08 +0000
committerChristian Trutz2011-05-09 22:58:08 +0000
commit6d072766314c5371500062459ab41d844e2f86dd (patch)
tree0d103457f328a5adba812eb9fc8188536f783ec7 /org.eclipse.mylyn.github.core/src/org/eclipse
parentf4ac39b90e9b8fb341b7063ddbfd1d8f316ea190 (diff)
downloadegit-github-6d072766314c5371500062459ab41d844e2f86dd.tar.gz
egit-github-6d072766314c5371500062459ab41d844e2f86dd.tar.xz
egit-github-6d072766314c5371500062459ab41d844e2f86dd.zip
Prevent null pointer exceptions on date getter methods.
Change-Id: I68f611e4e8b064ce72d52b73870116d97a1e2870 Signed-off-by: Christian Trutz <christian.trutz@gmail.com>
Diffstat (limited to 'org.eclipse.mylyn.github.core/src/org/eclipse')
-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 cabb24d2..d62e0cd0 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;
}
/**

Back to the top