diff --git a/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/LiveConditionalParser.java b/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/LiveConditionalParser.java index c0ab45c45..bc79cde3a 100644 --- a/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/LiveConditionalParser.java +++ b/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/LiveConditionalParser.java @@ -44,12 +44,12 @@ public class LiveConditionalParser { public Optional> parse() { try { List allConditionals = new ArrayList<>(); - JSONObject autoConfigReport = new JSONObject(autoConfigRecord); - if (autoConfigReport.has("contexts")) { - //more recently the report is nested inside the 'application' context. - autoConfigReport = autoConfigReport.getJSONObject("contexts").getJSONObject("application"); - } if (StringUtil.hasText(autoConfigRecord)) { + JSONObject autoConfigReport = new JSONObject(autoConfigRecord); + if (autoConfigReport.has("contexts")) { + //more recently the report is nested inside the 'application' context. + autoConfigReport = autoConfigReport.getJSONObject("contexts").getJSONObject("application"); + } for (LiveConditional c : getConditionalsFromPositiveMatches(autoConfigReport)) { allConditionals.add(c); }