poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 58779] New: Closing an XSSFWorkbook that was created with WorkbookFactory modifies the file
Date Tue, 29 Dec 2015 10:23:16 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=58779

            Bug ID: 58779
           Summary: Closing an XSSFWorkbook that was created with
                    WorkbookFactory modifies the file
           Product: POI
           Version: 3.14-dev
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: dev@poi.apache.org
          Reporter: onealj@apache.org

As noted in TestWorkbookFactory.java [1], XSSFWorkbooks that were opened with
WorkbookFactory and were not opened in read-only mode will modify the file upon
calling wb.close(), even if no changes were made to the workbook after creating
the XSSFWorkbook object.

To reproduce this problem, replace any `revert(wb)` with `wb.close()` in
TestWorkbookFactory.java and run TestWorkbookFactory.java. After running this
test, the SampleSS.xlsx file will have changed, as evidenced by "svn status
test-data/spreadsheet/SampleSS.xlsx"

[1]
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/ss/TestWorkbookFactory.java?revision=1722078&view=markup

-- 
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