]> source.dussan.org Git - poi.git/commitdiff
untidy hack for shared string counts that are higher than Integer.MAX_VALUE
authorPJ Fanning <fanningpj@apache.org>
Mon, 12 Dec 2022 18:20:21 +0000 (18:20 +0000)
committerPJ Fanning <fanningpj@apache.org>
Mon, 12 Dec 2022 18:20:21 +0000 (18:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905939 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java

index 95f0faaa14db5489b0cb47cb230f540ab9f8d146..8d90c78cce543741c91b1bafa695effa36bad3df 100644 (file)
@@ -241,9 +241,9 @@ public class ReadOnlySharedStringsTable extends DefaultHandler implements Shared
 
         if ("sst".equals(localName)) {
             String count = attributes.getValue("count");
-            if(count != null) this.count = Integer.parseInt(count);
+            if(count != null) this.count = (int) Long.parseLong(count);
             String uniqueCount = attributes.getValue("uniqueCount");
-            if(uniqueCount != null) this.uniqueCount = Integer.parseInt(uniqueCount);
+            if(uniqueCount != null) this.uniqueCount = (int) Long.parseLong(uniqueCount);
 
             this.strings = new ArrayList<>(this.uniqueCount);
             characters = new StringBuilder(64);