]> source.dussan.org Git - poi.git/commitdiff
[github-357] fix equals check in CellNumberFormatter. Thanks to XenoAmess. This close...
authorPJ Fanning <fanningpj@apache.org>
Fri, 15 Jul 2022 21:10:32 +0000 (21:10 +0000)
committerPJ Fanning <fanningpj@apache.org>
Fri, 15 Jul 2022 21:10:32 +0000 (21:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902750 13f79535-47bb-0310-9956-ffa450edef68

poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java

index 3765e3b4faae1dd031cbcc9d2d5c6152615365ef..ee4d787e9e0e78d497a680dff390378e0f0931f9 100644 (file)
@@ -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 {