From 6e34a3cebea926c356866502c81a7c17fbeb40f8 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Fri, 15 Jul 2022 21:10:32 +0000 Subject: [PATCH] [github-357] fix equals check in CellNumberFormatter. Thanks to XenoAmess. This closes #357 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902750 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/poi/ss/format/CellNumberFormatter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java b/poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java index 3765e3b4fa..ee4d787e9e 100644 --- a/poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java +++ b/poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java @@ -530,7 +530,7 @@ public class CellNumberFormatter extends CellFormatter { int modEndPos = delEndPos + adjust; if (modPos < modEndPos) { - if ("".equals(nextChange.getToAdd())) { + if (nextChange.getToAdd() != null && nextChange.getToAdd().length() == 0) { output.delete(modPos, modEndPos); } else { -- 2.39.5