From 267403b940665c36c7d1fb6b14dc535b21df41cf Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Tue, 6 Oct 2015 13:39:12 +0200 Subject: [PATCH] Unwrap io exception and throw it to the caller (EA-68913) --- .../src/com/intellij/openapi/vfs/impl/ZipHandler.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/platform/core-impl/src/com/intellij/openapi/vfs/impl/ZipHandler.java b/platform/core-impl/src/com/intellij/openapi/vfs/impl/ZipHandler.java index ce3172b0d7be..5e9630aad499 100644 --- a/platform/core-impl/src/com/intellij/openapi/vfs/impl/ZipHandler.java +++ b/platform/core-impl/src/com/intellij/openapi/vfs/impl/ZipHandler.java @@ -186,7 +186,15 @@ public class ZipHandler extends ArchiveHandler { @NotNull @Override public byte[] contentsToByteArray(@NotNull String relativePath) throws IOException { - FileAccessorCache.Handle zipRef = ourZipFileFileAccessorCache.get(this); + FileAccessorCache.Handle 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);