This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 7c86c60f7c Revert "avoid unsafe cast to int"
7c86c60f7c is described below

commit 7c86c60f7cab67e04e95784dc6618c86f104febf
Author: PJ Fanning <[email protected]>
AuthorDate: Wed Jul 23 17:19:45 2025 +0100

    Revert "avoid unsafe cast to int"
    
    This reverts commit 44da0ea183b87fd8514048ecd510ea57fd3f2b08.
---
 .../src/main/java/org/apache/poi/xssf/model/SharedStringsTable.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/poi-ooxml/src/main/java/org/apache/poi/xssf/model/SharedStringsTable.java 
b/poi-ooxml/src/main/java/org/apache/poi/xssf/model/SharedStringsTable.java
index dab4631371..b83f5f297e 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xssf/model/SharedStringsTable.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/model/SharedStringsTable.java
@@ -124,8 +124,8 @@ public class SharedStringsTable extends POIXMLDocumentPart 
implements SharedStri
             int cnt = 0;
             _sstDoc = SstDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
             CTSst sst = _sstDoc.getSst();
-            count = Math.toIntExact(sst.getCount());
-            uniqueCount = Math.toIntExact(sst.getUniqueCount());
+            count = (int)sst.getCount();
+            uniqueCount = (int)sst.getUniqueCount();
             //noinspection deprecation
             for (CTRst st : sst.getSiArray()) {
                 stmap.put(xmlText(st), cnt);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to