Fixed NPE in fetching autoconfig report
The report may not yet be available in the SpringBootApp and results in NPE.
This commit is contained in:
@@ -116,8 +116,10 @@ public class ConditionalsLiveHoverProvider implements HoverProvider {
|
||||
try {
|
||||
for (SpringBootApp app : runningApps) {
|
||||
String autoConfigRecord = app.getAutoConfigReport();
|
||||
JSONObject autoConfigJson = new JSONObject(autoConfigRecord);
|
||||
return Optional.of(getConditionFromPositiveMatches(annotation, autoConfigJson));
|
||||
if (autoConfigRecord != null) {
|
||||
JSONObject autoConfigJson = new JSONObject(autoConfigRecord);
|
||||
return Optional.of(getConditionFromPositiveMatches(annotation, autoConfigJson));
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
|
||||
Reference in New Issue
Block a user