Files
Sebastien Tardif eaf4a0a286 Close FileOutputStream delegate in InspectingOutputStream
InspectingOutputStream extends OutputStream but does not override
close(). When content exceeds MEMORY_LIMIT (approximately 4 KB),
convertToTempFile() replaces the ByteArrayOutputStream delegate with a
FileOutputStream. The try-with-resources in InspectedContent.of() calls
close(), which inherits the no-op OutputStream.close(), leaving the
FileOutputStream open and leaking a file descriptor.

Override close() to delegate to the underlying stream.

See gh-50639

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
2026-05-31 16:13:46 +02:00
..