diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2023-02-22 19:27:30 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2023-02-22 19:27:30 +0100 |
commit | 49f527386723ff219de0c726d74f200d89c959d7 (patch) | |
tree | 1be9f2656236ff570dc44f9bbeb9cb6641890f48 /org.eclipse.jgit | |
parent | a6da439b47bd2d7c3772f4a94d199894d3edaee9 (diff) | |
download | jgit-49f527386723ff219de0c726d74f200d89c959d7.tar.gz jgit-49f527386723ff219de0c726d74f200d89c959d7.zip |
Don't swallow IOException in GC.PidLock#lock
This broke the test GcConcurrentTest#testInterruptGc which expects
ClosedByInterruptException when the thread doing gc is interrupted.
Change-Id: I89e02fc37aceeccb04c20cfc5b71cb8fa21793d6
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java index 04c8418f6d..7feb50688a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java @@ -1631,7 +1631,7 @@ public class GC { pidFile = repo.getDirectory().toPath().resolve(GC_PID); } - boolean lock() { + boolean lock() throws IOException { if (Files.exists(pidFile)) { Instant mtime = FS.DETECTED .lastModifiedInstant(pidFile.toFile()); @@ -1670,7 +1670,7 @@ public class GC { JGitText.get().closePidLockFailed, pidFile), e1); } - return false; + throw e; } return true; } |