Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.10' into 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
philipmarzullo64 committed Jul 9, 2020
2 parents 293879d + 57882a0 commit 03d6283
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Expand Up @@ -33,7 +33,6 @@
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.StringReader;
import java.nio.file.Files;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;
Expand Down Expand Up @@ -169,10 +168,7 @@ public void setState(State state) {
}
}

try {
Files.move(file.toPath(), newFile.toPath());
} catch(IOException e) {
log.error(e.getMessage(),e);
if (!file.renameTo(newFile)) {
handleFailedRename(file, newFile);
}
}
Expand Down
Expand Up @@ -225,10 +225,9 @@ public IStagedResource find(String path) {
boolean foundResourcePath = resourcePathsCache.containsKey(path);
if (!foundResourcePath) {
synchronized (this) {
IStagedResource staged = createStagedResource(path);
if (staged.getState() == State.DONE) {
resource = createStagedResource(path);
if (resource.getState() == State.DONE) {
resourcePathsCache.put(path, path);
resource = staged;
foundResourcePath = true;
}
}
Expand Down

0 comments on commit 03d6283

Please sign in to comment.