From e431ec35c315118d90f84c1f85c475663480db7b Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 14 Feb 2023 15:12:18 +0000 Subject: safety check on throwable catch git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907656 13f79535-47bb-0310-9956-ffa450edef68 --- poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java index 42e27b4c97..4493c55962 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java @@ -336,7 +336,10 @@ public final class XSSFCell extends CellBase { try { int idx = Integer.parseInt(_cell.getV()); rt = (XSSFRichTextString)_sharedStringSource.getItemAt(idx); - } catch(Throwable t) { + } catch (Throwable t) { + if (ExceptionUtil.isFatal(t)) { + ExceptionUtil.rethrow(t); + } rt = new XSSFRichTextString(""); } } else { -- cgit v1.2.3