https://issues.apache.org/bugzilla/show_bug.cgi?id=49931

           Summary: IllegalStateException at
                    PageSettingsBlock$1.visitRecord
           Product: POI
           Version: 3.7-dev
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=26026)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26026)
Excel file to reproduce issue

I'm using POI 3.7 beta 2

When opening the attached Excel file with the following simple code:

InputStream is = file.openInputStream();
try {
    Workbook wb = WorkbookFactory.create(is);
} catch (InvalidFormatException e) {
} finally {
    is.close();
}

the following stack trace is thrown:

java.lang.IllegalStateException
at java.util.AbstractList$Itr.remove(AbstractList.java:356)
at
org.apache.poi.hssf.record.aggregates.PageSettingsBlock$1.visitRecord(PageSettingsBlock.java:666)
at
org.apache.poi.hssf.record.aggregates.CustomViewSettingsRecordAggregate.visitContainedRecords(CustomViewSettingsRecordAggregate.java:71)
at
org.apache.poi.hssf.record.aggregates.PageSettingsBlock.positionRecords(PageSettingsBlock.java:659)
at org.apache.poi.hssf.model.InternalSheet.<init>(InternalSheet.java:230)
at org.apache.poi.hssf.model.InternalSheet.createSheet(InternalSheet.java:162)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:273)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:187)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:304)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:285)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:60)


I cannot share the contents of the Excel file and so I removed it.  It is still
reproducing though.

This Excel file can be opened up fine using POI 3.6 libraries

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

Reply via email to