From: Dominik Stadler Date: Mon, 14 Mar 2016 12:00:27 +0000 (+0000) Subject: Remove some useless lines of code, the initialAllocationSize is ignored in SXSSFRow... X-Git-Tag: REL_3_15_BETA2~446 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=002ec1ec70122fef9d3b841a97a22d8c853a65c9;p=poi.git Remove some useless lines of code, the initialAllocationSize is ignored in SXSSFRow() anyway git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1734925 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java index 73863ce50b..4f1c47ccad 100644 --- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java +++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java @@ -133,19 +133,7 @@ public class SXSSFSheet implements Sheet, Cloneable "in the range [0," + _sh.getLastRowNum() + "] that is already written to disk."); } -//Make the initial allocation as big as the row above. - Row previousRow=rownum>0?getRow(rownum-1):null; - int initialAllocationSize=0; -//have previous row in memory -> take that value. - if(previousRow!=null) - initialAllocationSize=previousRow.getLastCellNum(); -//are we called after a flush(0)? If yes, ask the writer for the value. - if(initialAllocationSize<=0&&_writer.getNumberOfFlushedRows()>0) - initialAllocationSize=_writer.getNumberOfCellsOfLastFlushedRow(); -//default to 10 on the first row. - if(initialAllocationSize<=0) - initialAllocationSize=10; - SXSSFRow newRow=new SXSSFRow(this,initialAllocationSize); + SXSSFRow newRow=new SXSSFRow(this); _rows.put(rownum,newRow); allFlushed = false; if(_randomAccessWindowSize>=0&&_rows.size()>_randomAccessWindowSize)