aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorDaniel Fly <dn@smartweb.dk>2017-06-26 09:55:57 +0200
committerDaniel Fly <dn@smartweb.dk>2017-06-26 09:55:57 +0200
commit8d499a6049f88f77f2676c5dbef70c46d37948e9 (patch)
tree684a4cd1e6953b13828547341c8bba1fbe989ff0 /src/main
parentae9f49152ef726dedea1ba5ce29517979ada7e51 (diff)
downloadbbprb-8d499a6049f88f77f2676c5dbef70c46d37948e9.tar.gz
Added missing init to fix NullPointerException when setting build status
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuilds.java1
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuilds.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuilds.java
index 216287d..6ba3dab 100644
--- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuilds.java
+++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuilds.java
@@ -19,6 +19,7 @@ public class BitbucketBuilds {
public BitbucketBuilds(BitbucketBuildTrigger trigger, BitbucketRepository repository) {
this.trigger = trigger;
this.repository = repository;
+ this.repository.init();
}
void onStarted(BitbucketCause cause, Run<?, ?> build) {
diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java
index 4474581..086cf01 100644
--- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java
+++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java
@@ -33,7 +33,6 @@ public class BitbucketPullRequestsBuilder {
public void run() {
logger.fine("Build Start.");
- this.repository.init();
Collection<Pullrequest> targetPullRequests = this.repository.getTargetPullRequests();
this.repository.addFutureBuildTasks(targetPullRequests);
}
@@ -43,6 +42,7 @@ public class BitbucketPullRequestsBuilder {
throw new IllegalStateException();
}
this.repository = new BitbucketRepository(this.trigger.getProjectPath(), this);
+ this.repository.init();
this.builds = new BitbucketBuilds(this.trigger, this.repository);
return this;
}