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(); }