aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2020-07-15 21:35:35 +0000
committerPJ Fanning <fanningpj@apache.org>2020-07-15 21:35:35 +0000
commit6508360899d658147842cd63219f95ac5afe70b4 (patch)
treef6d9f5015715ee53ae2b3cc61a10bec27cf3d0a4
parent26c2049147c488edb04bbd099ea65ef494a86c72 (diff)
downloadpoi-6508360899d658147842cd63219f95ac5afe70b4.tar.gz
poi-6508360899d658147842cd63219f95ac5afe70b4.zip
try to fix build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879906 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java b/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java
index 154a5a80ae..9f4d1e629b 100644
--- a/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java
+++ b/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java
@@ -29,7 +29,6 @@ import org.apache.poi.util.XMLHelper;
import org.apache.poi.xssf.eventusermodel.XLSX2CSV;
import org.apache.poi.xssf.eventusermodel.XSSFReader;
import org.apache.poi.xssf.model.SharedStringsTable;
-import org.apache.poi.xssf.usermodel.XSSFRichTextString;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
@@ -134,11 +133,11 @@ public class FromHowTo {
throws SAXException {
// Process the last contents as required.
// Do now, as characters() may be called more than once
- if(nextIsString) {
+ if(nextIsString && !lastContents.isEmpty()) {
Integer idx = Integer.valueOf(lastContents);
lastContents = lruCache.get(idx);
if (lastContents == null && !lruCache.containsKey(idx)) {
- lastContents = new XSSFRichTextString(sst.getEntryAt(idx)).toString();
+ lastContents = sst.getItemAt(idx).toString();
lruCache.put(idx, lastContents);
}
nextIsString = false;