aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-12-12 17:36:51 +0000
committerPJ Fanning <fanningpj@apache.org>2022-12-12 17:36:51 +0000
commit4d0a627fb981c422f6488edab72bf76c8c9d4657 (patch)
tree985b3b4305190260ea12a412cea6abf8f61faa70
parent624f83431065e1a7613f1f044f1820c27e504266 (diff)
downloadpoi-4d0a627fb981c422f6488edab72bf76c8c9d4657.tar.gz
poi-4d0a627fb981c422f6488edab72bf76c8c9d4657.zip
small optimisation on getCellStyle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905936 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java
index 17d8e147b6..088f13f1f2 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java
@@ -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() {