aboutsummaryrefslogtreecommitdiffstats
path: root/poi-ooxml/src/main
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2023-02-14 15:12:18 +0000
committerPJ Fanning <fanningpj@apache.org>2023-02-14 15:12:18 +0000
commite431ec35c315118d90f84c1f85c475663480db7b (patch)
treed64c6fb86231c568172be7cbe4d07ed09addd89d /poi-ooxml/src/main
parent54fc06be818845918c1266d90c633e7ba68b07ea (diff)
downloadpoi-e431ec35c315118d90f84c1f85c475663480db7b.tar.gz
poi-e431ec35c315118d90f84c1f85c475663480db7b.zip
safety check on throwable catch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907656 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml/src/main')
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java5
1 files changed, 4 insertions, 1 deletions
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 {