Fix an NPE

This commit is contained in:
Kris De Volder
2017-10-24 10:36:29 -07:00
parent d4b6dd4e17
commit 4e5ae58f48

View File

@@ -100,8 +100,8 @@ public class RequestMappingHoverProvider implements HoverProvider {
try { try {
for (SpringBootApp app : runningApps) { for (SpringBootApp app : runningApps) {
String mappings = app.getRequestMappings(); String mappings = app.getRequestMappings();
if (mappings!=null) {
JSONObject requestMappings = new JSONObject(mappings); JSONObject requestMappings = new JSONObject(mappings);
String rawPath = getRawPath(annotation, requestMappings); String rawPath = getRawPath(annotation, requestMappings);
if (rawPath != null) { if (rawPath != null) {
String path = UrlUtil.extractPath(rawPath); String path = UrlUtil.extractPath(rawPath);
@@ -114,6 +114,7 @@ public class RequestMappingHoverProvider implements HoverProvider {
} }
} }
} }
}
} catch (Exception e) { } catch (Exception e) {
Log.log(e); Log.log(e);
} }