Unwrap io exception and throw it to the caller (EA-68913)

This commit is contained in:
Maxim.Mossienko
2015-10-06 13:46:44 +02:00
parent 896aa1494d
commit 267403b940
@@ -186,7 +186,15 @@ public class ZipHandler extends ArchiveHandler {
@NotNull
@Override
public byte[] contentsToByteArray(@NotNull String relativePath) throws IOException {
FileAccessorCache.Handle<ZipFile> zipRef = ourZipFileFileAccessorCache.get(this);
FileAccessorCache.Handle<ZipFile> zipRef;
try {
zipRef = ourZipFileFileAccessorCache.get(this);
} catch (RuntimeException ex) {
final Throwable cause = ex.getCause();
if (cause instanceof IOException) throw (IOException)cause;
throw ex;
}
ZipFile zip = zipRef.get();
try {
ZipEntry entry = zip.getEntry(relativePath);