Skip to content

Commit

Permalink
0005678: Extract fails with durationMillis must not be negative
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Feb 2, 2023
1 parent 4283f6c commit 1ff49a2
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -39,7 +39,8 @@ public long getLockAge() {
FileTime lastModifiedTime;
try {
lastModifiedTime = Files.getLastModifiedTime(lockFile.toPath());
return System.currentTimeMillis() - lastModifiedTime.toMillis();
long age = System.currentTimeMillis() - lastModifiedTime.toMillis();
return age < 0 ? 42 : age;
} catch (IOException ex) {
if (log.isDebugEnabled()) {
log.debug("Failed to get last modified time for file " + lockFile, ex);
Expand Down

0 comments on commit 1ff49a2

Please sign in to comment.