Skip to content

Commit

Permalink
FileUrlResource.isWritable() exclusively relies on getFile() implemen…
Browse files Browse the repository at this point in the history
…tation

Closes spring-projectsgh-25584

(cherry picked from commit c6cc670)
  • Loading branch information
jhoeller authored and engimatic committed Sep 29, 2020
1 parent 52d7c4e commit 88f3d3a
Showing 1 changed file with 2 additions and 9 deletions.
Expand Up @@ -90,15 +90,8 @@ public File getFile() throws IOException {
@Override
public boolean isWritable() {
try {
URL url = getURL();
if (ResourceUtils.isFileURL(url)) {
// Proceed with file system resolution
File file = getFile();
return (file.canWrite() && !file.isDirectory());
}
else {
return true;
}
File file = getFile();
return (file.canWrite() && !file.isDirectory());
}
catch (IOException ex) {
return false;
Expand Down

0 comments on commit 88f3d3a

Please sign in to comment.