kali834x opened a new pull request, #1128:
URL: https://github.com/apache/poi/pull/1128

   
   This PR fixes a temporary file leak in `ZipInputStreamZipEntrySource` when 
constructor initialization fails after temporary-backed entries have already 
been created.
   
   Changes
   
   * Added exception-safe cleanup to `ZipInputStreamZipEntrySource`.
   * If initialization fails due to a duplicate ZIP entry, I/O error, or other 
unexpected exception, all previously created `ZipArchiveFakeEntry` instances 
are closed to ensure their temporary files are deleted.
   * Cleans up internal state before rethrowing the original exception.
   * Added `testZipInputStreamZipEntrySourceExceptionReleasesResources` to 
verify that temporary files are properly removed when constructor 
initialization fails.
   
   Verification
   
   * Executed the new unit test and confirmed that temporary files are cleaned 
up on constructor failure.
   * Verified that the original exception is still propagated after resources 
are released.
   


-- 
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]

Reply via email to