From 5625f70d2573d22ee482e0efdc657c72258d8be7 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Fri, 25 Oct 2019 15:11:42 +0200 Subject: [PATCH] [errorprone] Don't throw exception in finally Instead log the problem. There is no reason to panic when we fail to delete a single temporary file in java.io.tmpdir. Change-Id: Idb867b3f07b090c7453ccd3688e94097df3b2672 Signed-off-by: Matthias Sohn --- org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java index b0c6f9641..2035ada80 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java @@ -844,7 +844,7 @@ public abstract class FS { try { FileUtils.delete(tempFile); } catch (IOException e) { - throw new RuntimeException(e); // panic + LOG.error(JGitText.get().cannotDeleteFile, tempFile); } } }