From f8a81c59af12383315ab5c75c94d1f9eb3a5a8bc Mon Sep 17 00:00:00 2001 From: Martin Damovsky Date: Wed, 22 Feb 2017 22:55:10 +0100 Subject: Fixed bug in PullRequest - NPE see https://github.com/nishio-dens/bitbucket-pullrequest-builder-plugin/issues/110 --- .../bitbucketpullrequestbuilder/bitbucket/Pullrequest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main') 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; -- cgit v1.2.3