Author: fanningpj
Date: Mon Dec 12 17:36:51 2022
New Revision: 1905936

URL: http://svn.apache.org/viewvc?rev=1905936&view=rev
Log:
small optimisation on getCellStyle

Modified:
    
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java

Modified: 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java?rev=1905936&r1=1905935&r2=1905936&view=diff
==============================================================================
--- 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java 
(original)
+++ 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java 
Mon Dec 12 17:36:51 2022
@@ -570,7 +570,7 @@ public class SXSSFCell extends CellBase
     /**
      * Return the cell's style.
      *
-     * @return the cell's style. Always not-null. Default cell style has zero 
index and can be obtained as
+     * @return the cell's style. Never null. Default cell style has zero index 
and can be obtained as
      * <code>workbook.getCellStyleAt(0)</code>
      * @see org.apache.poi.ss.usermodel.Workbook#getCellStyleAt(int)
      */
@@ -583,10 +583,9 @@ public class SXSSFCell extends CellBase
                 SXSSFWorkbook wb = getSheet().getWorkbook();
                 style = wb.getCellStyleAt(0);
             }
-            return style;
-        } else {
-            return _style;
+            _style = style;
         }
+        return _style;
     }
 
     private CellStyle getDefaultCellStyleFromColumn() {



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

Reply via email to