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 * workbook.getCellStyleAt(0) * @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() {