]> source.dussan.org Git - jgit.git/commit
ResolveMerger: Destroy TemporaryBuffer on unchecked exceptions 02/137902/1
authorDave Borowitz <dborowitz@google.com>
Fri, 1 Mar 2019 20:35:38 +0000 (12:35 -0800)
committerDave Borowitz <dborowitz@google.com>
Fri, 1 Mar 2019 20:35:38 +0000 (12:35 -0800)
commitea54b6a5a7305a9b68fd7bbca45f919ba978a934
tree96a09d763dc247b1f0932c004e2a563abfbf546d
parent875dccf33ccf16875c79a74998dcef49df23a8c0
ResolveMerger: Destroy TemporaryBuffer on unchecked exceptions

Previously, we called destroy() to delete the temp file on failure only
when catching an IOException, not a RuntimeException. Use a slightly
different construction with a finally block to ensure it's always
deleted on error (assuming the JVM is still healthy enough).

Change-Id: Ie201f3cfc81099ee1cafed066632da76223cef1f
org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java