https://issues.apache.org/bugzilla/show_bug.cgi?id=51378
Bug #: 51378
Summary: getDataFormatString crashes
Product: POI
Version: 3.8-dev
Platform: All
OS/Version: All
Status: NEW
Severity: critical
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 27159
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27159
Java code and Excel files to reproduce the getDataFormatString crash
The getDataFormatString method call crashes when reading the test file
test-data\spreadsheet\12561-1.xls
with the following stack trace.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array
index out of range: 56
at java.util.Vector.get(Vector.java:694)
at
org.apache.poi.hssf.usermodel.HSSFDataFormat.getFormat(HSSFDataFormat.java:146)
at
org.apache.poi.hssf.usermodel.HSSFCellStyle.getDataFormatString(HSSFCellStyle.java:133)
at
org.apache.poi.hssf.usermodel.HSSFCellStyle.getDataFormatString(HSSFCellStyle.java:110)
at
org.apache.poi.ss.examples.ReadDataFormat.getDataFormat(ReadDataFormat.java:15)
at org.apache.poi.ss.examples.ReadDataFormat.main(ReadDataFormat.java:34)
This happens in both poi-3.8-beta3 and poi-3.7.
I tested another Excel file and found that it failed with similar stack trace
in poi-3.8-beta3 but succeeded in poi-3.7. I believe there is a regression
here.
Please see attached source code and two Excel files to reproduce this issue.
--
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]