https://issues.apache.org/bugzilla/show_bug.cgi?id=51535
Bug #: 51535
Summary: NPOIFSFileSystem seems to parse row numbers as signed
Product: POI
Version: 3.8-dev
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 27303
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27303
A test document and a junit test case which exposes the issue
When I have a document with data in rows with a high number (say 65535) I get
array index exceptions because row numbers are negative. For instance in
ValueRecordsAggregate in line
CellValueRecordInterface[] rowCells = records[row];
row is -32768
moreover in HSSFSheet
while (row != null) {
createRowFromRecord(row);
row = sheet.getNextRow();
}
There are cases where row.getRowNumber returns a negative int. I tried to
manufacture an example file. It seems that NPOIFS somewhere parses the row
number as a signed number, while it has to be unsigned. I don't know enough POI
to fix this myself but my test case seems to show the problem.
It didn't occur with older POIFS.
--
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]