WidgetInfo button = panel.getWidgets().get(0);
// we can ask "grid", no exception
layout.getGridInfo();
// delete "explicit TableData"
{
TableDataInfo tableData = TableLayoutInfo.getTableData(button);
assertEquals(0, tableData.getColumn());
assertEquals(0, tableData.getRow());
assertEquals(1, tableData.getColSpan());
assertEquals(1, tableData.getRowSpan());
tableData.delete();
}
// because of invalid values in "virtual TableData"...
{
TableDataInfo tableData = TableLayoutInfo.getTableData(button);
assertEquals(0, tableData.getColumn());
assertEquals(0, tableData.getRow());
assertEquals(1, tableData.getColSpan());
assertEquals(1, tableData.getRowSpan());
}
// ...this caused exception
layout.getGridInfo();
}