aboutsummaryrefslogtreecommitdiffstats
path: root/poi/src
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-07-15 21:10:32 +0000
committerPJ Fanning <fanningpj@apache.org>2022-07-15 21:10:32 +0000
commit6e34a3cebea926c356866502c81a7c17fbeb40f8 (patch)
tree7b3e65dfc93e0256481fbf56b459054a60ae9385 /poi/src
parent2c479b4967b22b877a86f9bd6ec4ef5c4f85510f (diff)
downloadpoi-6e34a3cebea926c356866502c81a7c17fbeb40f8.tar.gz
poi-6e34a3cebea926c356866502c81a7c17fbeb40f8.zip
[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
Diffstat (limited to 'poi/src')
-rw-r--r--poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java2
1 files changed, 1 insertions, 1 deletions
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 {