Lines 836-839
public class TestXSSFCellStyle extends TestCase {
Link Here
|
836 |
assertNull(style.getStyleXf()); |
836 |
assertNull(style.getStyleXf()); |
837 |
} |
837 |
} |
838 |
|
838 |
|
|
|
839 |
/** |
840 |
* Avoid ArrayIndexOutOfBoundsException when getting cell style |
841 |
* in a workbook that has an empty xf table. |
842 |
*/ |
843 |
public void testBug55650() { |
844 |
XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook("52348.xlsx"); |
845 |
StylesTable st = workbook.getStylesSource(); |
846 |
assertEquals(0, st._getStyleXfsSize()); |
847 |
|
848 |
// no exception at this point |
849 |
XSSFCellStyle style = workbook.getSheetAt(0).getRow(0).getCell(0).getCellStyle(); |
850 |
assertNull(style.getStyleXf()); |
851 |
} |
852 |
|
839 |
} |
853 |
} |