From d9d37fc5ba85bb0a437145d911ea5368a26a1461 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Fri, 19 Jan 2024 11:54:46 +0100 Subject: [PATCH] Update StreamingWorkbookReader.java --- .../github/pjfanning/xlsx/impl/StreamingWorkbookReader.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/github/pjfanning/xlsx/impl/StreamingWorkbookReader.java b/src/main/java/com/github/pjfanning/xlsx/impl/StreamingWorkbookReader.java index 878a3581..b5701898 100644 --- a/src/main/java/com/github/pjfanning/xlsx/impl/StreamingWorkbookReader.java +++ b/src/main/java/com/github/pjfanning/xlsx/impl/StreamingWorkbookReader.java @@ -146,6 +146,9 @@ public void init(File f) throws OpenException, ReadException, ParseException { } catch(GeneralSecurityException e) { IOUtils.closeQuietly(pkg); throw new ReadException("Unable to read workbook - Decryption failed", e); + } catch(RuntimeException e) { + IOUtils.closeQuietly(pkg); + throw e; } }