poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51535] New: NPOIFSFileSystem seems to parse row numbers as signed
Date Wed, 20 Jul 2011 16:26:31 GMT

             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: dev@poi.apache.org
        ReportedBy: antoni.mylka@aduna-software.com
    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) {
  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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message