poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 64045] XSSFWorkbook constructor doesn't close ZipFile if an exception occurs
Date Wed, 22 Jan 2020 19:31:05 GMT

Dominik Stadler <dominik.stadler@gmx.at> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #8 from Dominik Stadler <dominik.stadler@gmx.at> ---
XSSFWorkbook and XWPFWorkbook were made similar via r1872453.

I tried to reproduce the warnings during running unit-tests that you posted,
unfortunately I could not reproduce those for now. 

Unfortunately the feature in commons-compress which we use here is not very
well-suited for debugging such findings: it does not print any stacktrace from
where the file was allocated and it depends on finalizer/garbage-collection
which is unpredictable and thus makes it impossible to properly reproduce
things with simple test-cases.

We usually use file-leak-detector from
https://github.com/kohsuke/file-leak-detector/ to check for unclosed resources.
It is much better in showing details and being reproducible but
commons-compress actually prevents file-leak-detector from detecting the leaks

Therefore I have reported https://issues.apache.org/jira/browse/COMPRESS-502 to
allow to disable this feature in commons-compress in the future so our own
testing for file-leaks can be used fully again.

However unless that happens I don't see more work possible here for now, so I
am closing this for now. 

Please report any additional leaking in new issues so we can adjust code

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message