mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-27 01:19:02 +00:00
Polish WebJarsResourceResolver
Fix a potential NPE when trying to resolve non-existing webjars resources in the resolver chain.
This commit is contained in:
+3
-1
@@ -75,7 +75,9 @@ public class WebJarsResourceResolver extends AbstractResourceResolver {
|
||||
String path = chain.resolveUrlPath(resourceUrlPath, locations);
|
||||
if (path == null) {
|
||||
String webJarResourcePath = findWebJarResourcePath(resourceUrlPath);
|
||||
return chain.resolveUrlPath(webJarResourcePath, locations);
|
||||
if(webJarResourcePath != null) {
|
||||
return chain.resolveUrlPath(webJarResourcePath, locations);
|
||||
}
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user