From: PJ Fanning Date: Tue, 16 Aug 2022 13:14:57 +0000 (+0000) Subject: [bug-66215] add test case (that shows we have issues and need fixes) X-Git-Tag: REL_5_2_3~57 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=74cc4ef32be990ef6f4b0cf635224df613097615;p=poi.git [bug-66215] add test case (that shows we have issues and need fixes) git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903459 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/TestStructuredReferences.java b/poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/TestStructuredReferences.java index 39c20881a3..03510d5b9d 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/TestStructuredReferences.java +++ b/poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/TestStructuredReferences.java @@ -182,7 +182,7 @@ class TestStructuredReferences { //correct all sheet table-reference-formulas which probably got damaged after shift rows for (CTTableColumn tableCol : table.getCTTable().getTableColumns().getTableColumnList()) { if (tableCol.getCalculatedColumnFormula() != null) { - int id = (int) tableCol.getId(); + int id = Math.toIntExact(tableCol.getId()); String formula = tableCol.getCalculatedColumnFormula().getStringValue(); int rFirst = table.getStartCellReference().getRow() + table.getHeaderRowCount(); int rLast = table.getEndCellReference().getRow() - table.getTotalsRowCount();