aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2023-02-05 20:34:19 +0000
committerPJ Fanning <fanningpj@apache.org>2023-02-05 20:34:19 +0000
commit43551babf1cf628aa184a2f9445412815781dc9e (patch)
tree84c1034c48b41f060f3a6ddbecd36addcf9ebbd2
parent7c372bd18c062e001289d39d4a92842dad52f949 (diff)
downloadpoi-43551babf1cf628aa184a2f9445412815781dc9e.tar.gz
poi-43551babf1cf628aa184a2f9445412815781dc9e.zip
[bug-65260] partial revert of recent changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907443 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java8
-rw-r--r--poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java4
2 files changed, 6 insertions, 6 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
index 44caba4217..d454fc1082 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
@@ -63,8 +63,8 @@ public class SXSSFSheet implements Sheet, OoxmlSheetExtensions {
setRandomAccessWindowSize(randomAccessWindowSize);
try {
_autoSizeColumnTracker = new AutoSizeColumnTracker(this);
- } catch (Throwable t) {
- LOG.atWarn().log("Failed to create AutoSizeColumnTracker, possibly due to fonts not being installed in your OS", t);
+ } catch (UnsatisfiedLinkError | InternalError e) {
+ LOG.atWarn().log("Failed to create AutoSizeColumnTracker, possibly due to fonts not being installed in your OS", e);
}
}
@@ -96,8 +96,8 @@ public class SXSSFSheet implements Sheet, OoxmlSheetExtensions {
setRandomAccessWindowSize(_workbook.getRandomAccessWindowSize());
try {
_autoSizeColumnTracker = new AutoSizeColumnTracker(this);
- } catch (Throwable t) {
- LOG.atWarn().log("Failed to create AutoSizeColumnTracker, possibly due to fonts not being installed in your OS", t);
+ } catch (UnsatisfiedLinkError | InternalError e) {
+ LOG.atWarn().log("Failed to create AutoSizeColumnTracker, possibly due to fonts not being installed in your OS", e);
}
}
diff --git a/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java b/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java
index d55e3634d5..130169999c 100644
--- a/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java
+++ b/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java
@@ -300,12 +300,12 @@ public class SheetUtil {
try {
TextLayout layout = new TextLayout(str.getIterator(), fontRenderContext);
return (int) layout.getAdvance();
- } catch (Throwable t) {
+ } catch (UnsatisfiedLinkError | NoClassDefFoundError | InternalError e) {
if (ignoreMissingFontSystem) {
return DEFAULT_CHAR_WIDTH;
}
- throw t;
+ throw e;
}
}