diff options
Diffstat (limited to 'poi-examples')
-rw-r--r-- | poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java index 60246e07a3..14d5fbd9e8 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java @@ -25,6 +25,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.PackageAccess; +import org.apache.poi.util.StringUtil; import org.apache.poi.util.XMLHelper; import org.apache.poi.xssf.eventusermodel.XSSFReader; import org.apache.poi.xssf.model.SharedStrings; @@ -132,7 +133,7 @@ public class FromHowTo { throws SAXException { // Process the last contents as required. // Do now, as characters() may be called more than once - if(nextIsString && !lastContents.trim().isEmpty()) { + if(nextIsString && StringUtil.isNotBlank(lastContents)) { Integer idx = Integer.valueOf(lastContents); lastContents = lruCache.get(idx); if (lastContents == null && !lruCache.containsKey(idx)) { |