aboutsummaryrefslogtreecommitdiffstats
path: root/validate/sample-mock-generator
diff options
context:
space:
mode:
Diffstat (limited to 'validate/sample-mock-generator')
-rw-r--r--validate/sample-mock-generator/src/main/java/org/onap/cli/http/mock/MockResponse.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/validate/sample-mock-generator/src/main/java/org/onap/cli/http/mock/MockResponse.java b/validate/sample-mock-generator/src/main/java/org/onap/cli/http/mock/MockResponse.java
index d7999bea..e49e4d41 100644
--- a/validate/sample-mock-generator/src/main/java/org/onap/cli/http/mock/MockResponse.java
+++ b/validate/sample-mock-generator/src/main/java/org/onap/cli/http/mock/MockResponse.java
@@ -38,7 +38,7 @@ public class MockResponse {
}
public void setJson(String json) throws IOException {
- if (!json.isEmpty()) {
+ if (json != null && !json.isEmpty()) {
try {
ObjectMapper objectMapper = new ObjectMapper();
this.json = objectMapper.readTree(json);