Fix an NPE
This commit is contained in:
@@ -100,16 +100,17 @@ public class RequestMappingHoverProvider implements HoverProvider {
|
|||||||
try {
|
try {
|
||||||
for (SpringBootApp app : runningApps) {
|
for (SpringBootApp app : runningApps) {
|
||||||
String mappings = app.getRequestMappings();
|
String mappings = app.getRequestMappings();
|
||||||
JSONObject requestMappings = new JSONObject(mappings);
|
if (mappings!=null) {
|
||||||
|
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);
|
||||||
if (path != null) {
|
if (path != null) {
|
||||||
String rawMethod = getRawMethod(annotation, requestMappings);
|
String rawMethod = getRawMethod(annotation, requestMappings);
|
||||||
JLRMethod parsedMethod = JLRMethodParser.parse(rawMethod);
|
JLRMethod parsedMethod = JLRMethodParser.parse(rawMethod);
|
||||||
if (methodMatchesAnnotation(annotation, parsedMethod)) {
|
if (methodMatchesAnnotation(annotation, parsedMethod)) {
|
||||||
return Optional.of(new RequestMappingMethod(path, parsedMethod, app));
|
return Optional.of(new RequestMappingMethod(path, parsedMethod, app));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user