https://issues.apache.org/bugzilla/show_bug.cgi?id=56609
Bug ID: 56609
Summary: Resource leak in WorkbookFactory.create()
Product: POI
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: POI Overall
Assignee: [email protected]
Reporter: [email protected]
WorkbookFactory.create() does not close the filesystem it opens, so after some
time server JVM crashes with "Too many open files" error.
I've read bug 56537, but disagree the proposed workaround -- to copy-paste
create() source code, because it's not evident that it leaks resource (until it
goes to production). There's no warnings in create() javadoc about the leak, so
there's no reason for user to not trust it does the right thing.
I think it's better to not have the method at all, to force user to care about
closing file handles (before the buggy code is pushed to production servers,
not after). In the way it is currently, it's certainly not industry-reliable:
it not only stops creating Workbook-s, it crashes the whole JVM with all the
services in the JVM.
Or, to make it to close file handles automatically in any way you prefer.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]