From 7872c2afcbb39ccd165dd5cb1f378d24ab807da1 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Wed, 17 Dec 2025 22:08:23 +0100 Subject: [PATCH] refactor recurse check (#979) --- .../src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a9062ff7bf..af4c9d57a8 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 @@ -410,7 +410,7 @@ public final class XSSFCell extends CellBase { /* In an excel generated array formula, the formula property might be set, but the string is empty in related cells */ if (f == null || f.getStringValue().isEmpty()) { XSSFCell cell = getSheet().getFirstCellInArrayFormula(this); - if (cell != this) { + if (!equals(cell)) { return cell.getCellFormula(fpb); } }