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