diff options
author | Martin Damovsky <martin.damovsky@gmail.com> | 2017-02-22 22:55:10 +0100 |
---|---|---|
committer | Martin Damovsky <martin.damovsky@gmail.com> | 2017-02-22 22:55:10 +0100 |
commit | f8a81c59af12383315ab5c75c94d1f9eb3a5a8bc (patch) | |
tree | 493093406c7c47da522773bf7f77f6b3b4167028 /src/main/java/bitbucketpullrequestbuilder | |
parent | 8717b231004ce0f4446d02e1506111b4ec13f86a (diff) | |
download | bbprb-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.java | 5 |
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; |