Skip to content
Snippets Groups Projects
Commit f748b490 authored by felmer's avatar felmer
Browse files

Bug fix in Tar: closeArchiveEntry() put into a finally clause because it...

Bug fix in Tar: closeArchiveEntry() put into a finally clause because it should be called in any case.

SVN: 33377
parent 404318a4
No related branches found
No related tags found
No related merge requests found
...@@ -157,11 +157,16 @@ public class Tar implements Closeable ...@@ -157,11 +157,16 @@ public class Tar implements Closeable
entry.setGroupName(groupname); entry.setGroupName(groupname);
} }
out.putArchiveEntry(entry); out.putArchiveEntry(entry);
if (input != null) try
{ {
IOUtils.copyLarge(input, out); if (input != null)
{
IOUtils.copyLarge(input, out);
}
} finally
{
out.closeArchiveEntry();
} }
out.closeArchiveEntry();
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment