From 526092686cd01129052b53a356fa25a7f78a2702 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Tue, 16 Apr 2019 20:24:05 +0400 Subject: [PATCH] Fixed NPE --- .../cloud/contract/stubrunner/StubRunnerOptions.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/StubRunnerOptions.java b/spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/StubRunnerOptions.java index 1267637ea0..fb6ec8d754 100644 --- a/spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/StubRunnerOptions.java +++ b/spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/StubRunnerOptions.java @@ -211,6 +211,9 @@ public class StubRunnerOptions { } public String getStubRepositoryRootAsString() { + if (this.stubRepositoryRoot == null) { + return ""; + } try { return this.stubRepositoryRoot.getURI().toString(); }