]> source.dussan.org Git - poi.git/commitdiff
minor perf issue
authorPJ Fanning <fanningpj@apache.org>
Mon, 14 Feb 2022 20:41:18 +0000 (20:41 +0000)
committerPJ Fanning <fanningpj@apache.org>
Mon, 14 Feb 2022 20:41:18 +0000 (20:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898091 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java

index 98aa883b84b3d7bd5e34b307eaac54377701d789..7ec3020bda3d2f428d9586a8ffd8007e74898b0f 100644 (file)
@@ -297,7 +297,8 @@ public final class XSSFCell extends CellBase {
                 rt = new XSSFRichTextString("");
                 break;
             case STRING:
-                if (_cell.getT() == STCellType.INLINE_STR) {
+                STCellType.Enum xmlbeanCellType = _cell.getT();
+                if (xmlbeanCellType == STCellType.INLINE_STR) {
                     if(_cell.isSetIs()) {
                         //string is expressed directly in the cell definition instead of implementing the shared string table.
                         rt = new XSSFRichTextString(_cell.getIs());
@@ -307,7 +308,7 @@ public final class XSSFCell extends CellBase {
                     } else {
                         rt = new XSSFRichTextString("");
                     }
-                } else if (_cell.getT() == STCellType.STR) {
+                } else if (xmlbeanCellType == STCellType.STR) {
                     //cached formula value
                     rt = new XSSFRichTextString(_cell.isSetV() ? _cell.getV() : "");
                 } else {