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 gh-25584

(cherry picked from commit c6cc670)
  • Loading branch information
jhoeller committed Sep 8, 2020
1 parent 1f3f9b1 commit 3de1f76
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 3de1f76

Please sign in to comment.