From 7dbfc41dfbb3edd45fd63929fd9c8a87c7a76d4c Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Mon, 14 Feb 2022 20:04:06 +0000 Subject: [PATCH] monor perf issue in XSSFCell git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898083 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/poi/xssf/usermodel/XSSFCell.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java index 8561f74ed1..98aa883b84 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java @@ -117,8 +117,9 @@ public final class XSSFCell extends CellBase { protected XSSFCell(XSSFRow row, CTCell cell) { _cell = cell; _row = row; - if (cell.getR() != null) { - _cellNum = new CellReference(cell.getR()).getCol(); + String rval = cell.getR(); + if (rval != null) { + _cellNum = new CellReference(rval).getCol(); } else { int prevNum = row.getLastCellNum(); if(prevNum != -1){ -- 2.39.5