https://issues.apache.org/bugzilla/show_bug.cgi?id=48571
Summary: OPCPackage blocks file
Product: POI
Version: 3.7-dev
Platform: PC
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: POI Overall
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=24859)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=24859)
Adds some lines in order to close all Streams created in OPCPackage
Whenever a file (docx, xlsx, pptx) is opened as OPCPackage, modified and
afterwards closed with OPCPackage#close, the Java process keeps a file handle
open. In order to modify a document with Word, Excel or Powerpoint, the Java
process must terminate in order to release the file.
This happens because OPCPackage creates and opens Streams, which are never
closed.
See enclosed Patch for a fix. I couldn't find a problem with that solution so
far.
Generally speaking, I have the opinion that everyone creating a stream is
responsible for the stream lifecycle and must take care that the stream is
closed, after all actions requiring it, are done.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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]