[bug-65260] partial revert of recent changes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907443 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2023-02-05 20:34:19 +00:00
parent 7c372bd18c
commit 43551babf1
2 changed files with 6 additions and 6 deletions

View File

@ -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);
}
}

View File

@ -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;
}
}