poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 59634] New: XSSFWorkbook#close() violates contract from Workbook#close()
Date Wed, 25 May 2016 14:46:53 GMT

            Bug ID: 59634
           Summary: XSSFWorkbook#close() violates contract from
           Product: POI
           Version: 3.14-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: michael.holtermann@dfb-medien.de

Created attachment 33890
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33890&action=edit
TestCase demonstrating the issue

According to Workbook#close() it should not have any effect on newly created

This is true for HSSFWorkbooks.

For XSSFWorkbooks it's not possible to write the document to an OutputStream
after calling #close().

Since I'm mostly creating Workbooks from scratch, I thought I can call #close()
just after creation of Worbook, instead of somewhere later when the document
was written to outside world.

Please see the attached test case that should demonstrate the issue.

(Side note: The documentation states #close() will close the underlying input
resource the Workbook was created from (e.g. calls to constructor
HSSFWorkbook(InputStream)?). Shouldn't be the creator of that InputStream
responsible for closing that Stream?)


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