YuWeiBoy opened a new pull request, #703: URL: https://github.com/apache/commons-compress/pull/703
I fixed the issue where ZstdCompressorInputStream closes the underlying stream. 1. The bug occurred because multiple streams are all wrapped from the same stream, and the ZstdInputStream used in ZstdCompressorInputStream would close the passed InputStream during GC, which in turn caused the bug. 2. The principle to fix this bug is to wrap the InputStream passed to ZstdInputStream with CloseShieldInputStream. 3. I wrote the testZstdInputStreamErrorCloseWhenGc method for testing, and in this method, I called System.gc(); to quickly trigger Java's GC to reproduce the bug. -- 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]
