summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.archive/src/org
diff options
context:
space:
mode:
authorJonathan Nieder <jrn@google.com>2013-09-23 17:35:15 -0700
committerJonathan Nieder <jrn@google.com>2013-09-23 17:35:15 -0700
commit3467e865acac2f923b5d24b2084ae8a8a1f1e7ba (patch)
tree2ee4f2203a2fe03887f7ac74dcbab15b710b3c2d /org.eclipse.jgit.archive/src/org
parent8a51c4453df0015ee0b77076ffb34eecdfcc7ec6 (diff)
downloadjgit-3467e865acac2f923b5d24b2084ae8a8a1f1e7ba.tar.gz
jgit-3467e865acac2f923b5d24b2084ae8a8a1f1e7ba.zip
Revert "Close unfinished archive entries on error"
This reverts commit 75d9b31f14d6226a535a80c05cffda29e55d2ceb. Now that we do not try to close the ArchiveOutputStream in the error path, there is no need to artificially close partial entries from before the error. Change-Id: I1f1cb08ec4e9b14c79bf4621f3fa959463034b82 Signed-off-by: Jonathan Nieder <jrn@google.com>
Diffstat (limited to 'org.eclipse.jgit.archive/src/org')
-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() {