Skip to content
Snippets Groups Projects
Commit 6e5aee9b authored by sjfink's avatar sjfink Committed by Perry Cheng
Browse files

guard against NPE that occurs in some regression tests

parent 593f97ae
No related branches found
No related tags found
No related merge requests found
......@@ -550,7 +550,11 @@ public class WskCli {
String activationId = extractActivationIdFromCliResult(response);
String result = extractActivationResultFromCliResult(response);
JsonObject json = new JsonParser().parse(result).getAsJsonObject();
return Pair.make(activationId, json.get("response").toString());
if (json == null || json.get("response") == null) {
return Pair.make(activationId, "invalid Json response: " + result);
} else {
return Pair.make(activationId, json.get("response").toString());
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment