From: Nick Burch Date: Fri, 16 Feb 2018 11:47:24 +0000 (+0000) Subject: Unit test to try to reproduce bug #62108 (currenly works though...) X-Git-Tag: REL_4_0_0_FINAL~241 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d0e9e4bc6ddc15fcc8ebe601df74250eae47b308;p=poi.git Unit test to try to reproduce bug #62108 (currenly works though...) git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1824451 13f79535-47bb-0310-9956-ffa450edef68 --- 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