poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56609] New: Resource leak in WorkbookFactory.create()
Date Mon, 09 Jun 2014 17:46:36 GMT
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: dev@poi.apache.org
          Reporter: dlazerka@gmail.com

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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message