aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Nieder2013-09-23 20:35:15 (EDT)
committerJonathan Nieder2013-09-23 20:35:15 (EDT)
commit3467e865acac2f923b5d24b2084ae8a8a1f1e7ba (patch)
tree2ee4f2203a2fe03887f7ac74dcbab15b710b3c2d
parent8a51c4453df0015ee0b77076ffb34eecdfcc7ec6 (diff)
downloadjgit-3467e865acac2f923b5d24b2084ae8a8a1f1e7ba.zip
jgit-3467e865acac2f923b5d24b2084ae8a8a1f1e7ba.tar.gz
jgit-3467e865acac2f923b5d24b2084ae8a8a1f1e7ba.tar.bz2
Revert "Close unfinished archive entries on error"refs/changes/10/16710/1
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>
-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 f90573e..23f4bed 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 be7264b..00c962b 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() {