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
  • Loading branch information
jhoeller committed Sep 8, 2020
1 parent ae1d15c commit c6cc670
Showing 1 changed file with 2 additions and 9 deletions.
Expand Up @@ -89,15 +89,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 c6cc670

Please sign in to comment.