summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.archive
diff options
context:
space:
mode:
authorDave Borowitz <dborowitz@google.com>2013-11-01 23:12:29 -0400
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2013-11-01 23:12:29 -0400
commit17dc02a579d2e5f7174bb46dbccd636272d41990 (patch)
treeda5a48cbeeaff85a8265609342f9a080d9acd002 /org.eclipse.jgit.archive
parentda9db6b20c6203dae3f828adbd14218ea063ad91 (diff)
parent3467e865acac2f923b5d24b2084ae8a8a1f1e7ba (diff)
downloadjgit-17dc02a579d2e5f7174bb46dbccd636272d41990.tar.gz
jgit-17dc02a579d2e5f7174bb46dbccd636272d41990.zip
Merge "Revert "Close unfinished archive entries on error""
Diffstat (limited to 'org.eclipse.jgit.archive')
-rw-r--r--org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java7
-rw-r--r--org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java7
2 files changed, 4 insertions, 10 deletions
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 f90573ebc8..23f4beda14 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<ArchiveOutputStream> {
}
entry.setSize(loader.getSize());
out.putArchiveEntry(entry);
- try {
- loader.copyTo(out);
- } finally {
- out.closeArchiveEntry();
- }
+ loader.copyTo(out);
+ out.closeArchiveEntry();
}
public Iterable<String> 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 be7264bd8b..00c962bc98 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<ArchiveOutputStream> {
}
entry.setSize(loader.getSize());
out.putArchiveEntry(entry);
- try {
- loader.copyTo(out);
- } finally {
- out.closeArchiveEntry();
- }
+ loader.copyTo(out);
+ out.closeArchiveEntry();
}
public Iterable<String> suffixes() {