diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-12-12 18:20:21 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-12-12 18:20:21 +0000 |
commit | fdffe5f66d1c4c09b1edf77f009c3950f60b9ed0 (patch) | |
tree | 4c29c29e23684506912c4d635b7130e5d3b4382f | |
parent | 1b4e8ba77ba7a09978370c3864c5b4436788981d (diff) | |
download | poi-fdffe5f66d1c4c09b1edf77f009c3950f60b9ed0.tar.gz poi-fdffe5f66d1c4c09b1edf77f009c3950f60b9ed0.zip |
untidy hack for shared string counts that are higher than Integer.MAX_VALUE
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905939 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java index 95f0faaa14..8d90c78cce 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java @@ -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); |