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 <[email protected]> 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) <[email protected]> Report URL: https://github.com/apache/poi/actions/runs/34118596091 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
