Author: centic
Date: Mon Mar 14 12:00:27 2016
New Revision: 1734925

URL: http://svn.apache.org/viewvc?rev=1734925&view=rev
Log:
Remove some useless lines of code, the initialAllocationSize is ignored in 
SXSSFRow() anyway

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java?rev=1734925&r1=1734924&r2=1734925&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java Mon 
Mar 14 12:00:27 2016
@@ -133,19 +133,7 @@ public class SXSSFSheet implements Sheet
                             "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)



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to