pjfanning opened a new pull request, #108: URL: https://github.com/apache/poi-xmlbeans/pull/108
`SchemaTypeSystemImpl.resolveHandle` constructs an `XsbReader` — which opens the `.xsb` resource stream — and then dispatches on the file type it read. Every `finishLoadingXxx()` closes the reader in a `finally`, but the `default:` arm throws `IllegalStateException` without closing, leaking the stream. That arm is reachable in practice: `FILETYPE_SCHEMAPOINTER` is a file type the compiler writes (`savePointerFile`) but this switch does not handle, as is any file type read out of a corrupt or crafted `.xsb`. Added `ResolveHandleFileTypeTest`, which serves a well-formed pointer `.xsb` through a stub `ResourceLoader` and asserts the stream is closed. It fails on trunk and passes with this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
