You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by GitBox <gi...@apache.org> on 2026/09/07 12:09:33 UTC
[GH] (poi/fix-mainextractorfactory-fatal): Workflow run "Java CI with Ant" failed!
The GitHub Actions job "Java CI with Ant" on poi.git/fix-mainextractorfactory-fatal has failed.
Run started by GitHub user pjfanning (triggered by pjfanning).
Head commit for run:
3bb15fe21681fcc60dcc0580415f4546a9c7a289 / PJ Fanning <pj...@users.noreply.github.com>
Stop MainExtractorFactory swallowing fatal errors
Both create(File, String) and create(InputStream, String) guarded their
cleanup with an inverted fatal check:
} catch (Throwable t) {
if (!ExceptionUtil.isFatal(t)) {
fs.close();
throw t;
}
}
For a fatal throwable - VirtualMachineError, ThreadDeath - the catch body
does nothing at all. Execution falls through to the "extractor == null"
branch and the method returns null, so an OutOfMemoryError raised while
building the extractor is reported to the caller as "no extractor for
this file".
The rest of the codebase uses the opposite form, rethrowing fatal
throwables rather than suppressing them - see XMLHelper, CleanerUtil and
HSSFParser.
There is nothing here that needs to treat fatal throwables differently:
the only work in the catch block is closing a filesystem this method
opened and owns. Drop the isFatal check so every throwable propagates,
and switch to IOUtils.closeQuietly so a failure while closing cannot mask
the original throwable. ExtractorFactory.createExtractor uses the same
closeQuietly-then-rethrow shape.
The filesystem is still closed on every failure path, so this does not
reintroduce a leak.
Co-Authored-By: Claude Opus 5 (1M context) <no...@anthropic.com>
Report URL: https://github.com/apache/poi/actions/runs/34118596091
With regards,
GitHub Actions via GitBox
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org