diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java index f90573ebc..23f4beda1 100644 --- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java +++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java @@ -93,11 +93,8 @@ public class TarFormat implements ArchiveCommand.Format { } entry.setSize(loader.getSize()); out.putArchiveEntry(entry); - try { - loader.copyTo(out); - } finally { - out.closeArchiveEntry(); - } + loader.copyTo(out); + out.closeArchiveEntry(); } public Iterable suffixes() { diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java index be7264bd8..00c962bc9 100644 --- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java +++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java @@ -82,11 +82,8 @@ public class ZipFormat implements ArchiveCommand.Format { } entry.setSize(loader.getSize()); out.putArchiveEntry(entry); - try { - loader.copyTo(out); - } finally { - out.closeArchiveEntry(); - } + loader.copyTo(out); + out.closeArchiveEntry(); } public Iterable suffixes() {