diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java index 131b441d64..fe8cafcaac 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java @@ -3252,4 +3252,45 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { wb.close(); } + + /** + * Auto column sizing failed when there were loads of fonts with + * errors like ArrayIndexOutOfBoundsException: -32765 + * TODO Get this to actually reproduce the bug... + */ + @Test + public void test62108() throws IOException { + XSSFWorkbook wb = new XSSFWorkbook(); + XSSFSheet sheet = wb.createSheet(); + XSSFRow row = sheet.createRow(0); + + // Create lots of fonts + XSSFDataFormat formats = wb.createDataFormat(); + XSSFFont[] fonts = new XSSFFont[50000]; + for (int i=0; i