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 5de4f75 commit b7883c3
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 b7883c3

Please sign in to comment.