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 b1f89efced..c74da90760 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 @@ -221,6 +221,9 @@ public class StubRunnerOptions { } public String getStubRepositoryRootAsString() { + if (this.stubRepositoryRoot == null) { + return ""; + } try { return this.stubRepositoryRoot.getURI().toString(); }