poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dno...@apache.org
Subject svn commit: r1722457 - /poi/trunk/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java
Date Thu, 31 Dec 2015 18:15:39 GMT
Author: dnorth
Date: Thu Dec 31 18:15:35 2015
New Revision: 1722457

URL: http://svn.apache.org/viewvc?rev=1722457&view=rev
Log:
Fix example. If you don't call super for the non-ignored sheets, everything breaks because
you end up with an empty workbook.

https://bz.apache.org/bugzilla/show_bug.cgi?id=58219

Modified:
    poi/trunk/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java

Modified: poi/trunk/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java?rev=1722457&r1=1722456&r2=1722457&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java
(original)
+++ poi/trunk/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java
Thu Dec 31 18:15:35 2015
@@ -43,8 +43,8 @@ public class HybridStreaming {
         XSSFWorkbook workbook = new XSSFWorkbook(sourceBytes) {
             /** Avoid DOM parse of large sheet */
             public void parseSheet(java.util.Map<String,XSSFSheet> shIdMap, CTSheet
ctSheet) {
-                if (SHEET_TO_STREAM.equals(ctSheet.getName())) {
-                    return;
+                if (!SHEET_TO_STREAM.equals(ctSheet.getName())) {
+                    super.parseSheet(shIdMap, ctSheet);
                 }
             };
         };



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message