IDEMPIERE-1763 Add Index out of bound checking.

This commit is contained in:
Heng Sin Low 2014-01-23 22:13:20 +08:00
parent d4ac873530
commit 157b2f1534
1 changed files with 4 additions and 1 deletions

View File

@ -332,7 +332,7 @@ public class TableElement extends PrintElement
{
dimensions.set(dataCol, new Dimension2DImpl());
continue;
}
}
String string = dataItem.toString();
if (string.length() == 0)
{
@ -1196,6 +1196,9 @@ public class TableElement extends PrintElement
if (pageXindex+1 < m_firstColumnOnPage.size())
nextPageColumn = ((Integer)m_firstColumnOnPage.get(pageXindex+1)).intValue();
//
if (pageYindex >= m_firstRowOnPage.size()) {
pageYindex = m_firstRowOnPage.size() - 1;
}
int firstRow = ((Integer)m_firstRowOnPage.get(pageYindex)).intValue();
int nextPageRow = m_data.getRowCount(); // no of rows
if (pageYindex+1 < m_firstRowOnPage.size())