aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorMartin Damovsky <martin.damovsky@gmail.com>2017-02-22 23:07:26 +0100
committerGitHub <noreply@github.com>2017-02-22 23:07:26 +0100
commit67e38c42109c9ed95462d1dd47404c6c102d3854 (patch)
tree493093406c7c47da522773bf7f77f6b3b4167028 /src/main
parent941701577b170d8778079db854f02bb1d7bb032f (diff)
parentf8a81c59af12383315ab5c75c94d1f9eb3a5a8bc (diff)
downloadbbprb-67e38c42109c9ed95462d1dd47404c6c102d3854.tar.gz
Merge pull request #111 from jenkinsci/bug-NPE-pullrequest
Fixed bug in PullRequest - NPE
Diffstat (limited to 'src/main')
-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;