ClassPathResource.isReadable() checks InputStream (for jar directories)

Resource.isReadable() is defined to semantically imply exists() now.

Issue: SPR-16832
This commit is contained in:
Juergen Hoeller
2018-05-29 21:47:33 +02:00
parent 8593fec22c
commit 69f14a2038
6 changed files with 54 additions and 20 deletions

View File

@@ -183,7 +183,7 @@ public class PathResourceResolver extends AbstractResourceResolver {
@Nullable
protected Resource getResource(String resourcePath, Resource location) throws IOException {
Resource resource = location.createRelative(resourcePath);
if (resource.exists() && resource.isReadable()) {
if (resource.isReadable()) {
if (checkResource(resource, location)) {
return resource;
}