Fix for rows between 32767 and 65536, don't incorrectly cast to a short (fixes #43401)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@576519 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c733acf8b4
commit
1f056652b7
@ -76,11 +76,13 @@ public class RowRecordsAggregate
|
|||||||
|
|
||||||
public RowRecord getRow(int rownum)
|
public RowRecord getRow(int rownum)
|
||||||
{
|
{
|
||||||
|
// Row must be between 0 and 65535
|
||||||
|
if(rownum < 0 || rownum > 65535) {
|
||||||
|
throw new IllegalArgumentException("The row number must be between 0 and 65535");
|
||||||
|
}
|
||||||
|
|
||||||
// Integer integer = new Integer(rownum);
|
|
||||||
RowRecord row = new RowRecord();
|
RowRecord row = new RowRecord();
|
||||||
|
row.setRowNumber(rownum);
|
||||||
row.setRowNumber(( short ) rownum);
|
|
||||||
return ( RowRecord ) records.get(row);
|
return ( RowRecord ) records.get(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user