aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/bitbucketpullrequestbuilder
diff options
context:
space:
mode:
authorMartin Damovsky <martin.damovsky@gmail.com>2017-02-22 22:55:10 +0100
committerMartin Damovsky <martin.damovsky@gmail.com>2017-02-22 22:55:10 +0100
commitf8a81c59af12383315ab5c75c94d1f9eb3a5a8bc (patch)
tree493093406c7c47da522773bf7f77f6b3b4167028 /src/main/java/bitbucketpullrequestbuilder
parent8717b231004ce0f4446d02e1506111b4ec13f86a (diff)
downloadbbprb-f8a81c59af12383315ab5c75c94d1f9eb3a5a8bc.tar.gz
Fixed bug in PullRequest - NPE see https://github.com/nishio-dens/bitbucket-pullrequest-builder-plugin/issues/110
Diffstat (limited to 'src/main/java/bitbucketpullrequestbuilder')
-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;