aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/Pullrequest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/Pullrequest.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/Pullrequest.java
index e86d88d..5cf1fa7 100644
--- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/Pullrequest.java
+++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/Pullrequest.java
@@ -189,8 +189,11 @@ public class Pullrequest {
private String updatedOn;
private String createdOn;
+ @Override
public int compareTo(Comment target) {
- if (this.getId() > target.getId()) {
+ if (target == null){
+ return -1;
+ } else if (this.getId() > target.getId()) {
return 1;
} else if (this.getId().equals(target.getId())) {
return 0;