diff options
author | Martin Damovsky <martin.damovsky@gmail.com> | 2017-02-22 23:07:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-22 23:07:26 +0100 |
commit | 67e38c42109c9ed95462d1dd47404c6c102d3854 (patch) | |
tree | 493093406c7c47da522773bf7f77f6b3b4167028 | |
parent | 941701577b170d8778079db854f02bb1d7bb032f (diff) | |
parent | f8a81c59af12383315ab5c75c94d1f9eb3a5a8bc (diff) | |
download | bbprb-67e38c42109c9ed95462d1dd47404c6c102d3854.tar.gz |
Merge pull request #111 from jenkinsci/bug-NPE-pullrequest
Fixed bug in PullRequest - NPE
-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; |