diff options
author | Dominik Stadler <centic@apache.org> | 2024-07-28 11:02:18 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2024-07-28 11:02:18 +0000 |
commit | 0559accac420546df618823758d928f390eaab20 (patch) | |
tree | 1d82160d1f11b763fe619a486bdee516e2807bc4 /poi-ooxml/src | |
parent | c05eebf415c9273eb9f874fa7480aed815700ce4 (diff) | |
download | poi-0559accac420546df618823758d928f390eaab20.tar.gz poi-0559accac420546df618823758d928f390eaab20.zip |
Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a possible NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70467
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919562 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml/src')
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/geometry/MoveTo.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/geometry/MoveTo.java b/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/geometry/MoveTo.java index c324d916a4..36bf1aec23 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/geometry/MoveTo.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/geometry/MoveTo.java @@ -48,9 +48,9 @@ public class MoveTo implements GeometryRow { for (CellType cell : row.getCellArray()) { String cellName = cell.getN(); - if (cellName.equals("X")) { + if ("X".equals(cellName)) { x = XDGFCell.parseDoubleValue(cell); - } else if (cellName.equals("Y")) { + } else if ("Y".equals(cellName)) { y = XDGFCell.parseDoubleValue(cell); } else { throw new POIXMLException("Invalid cell '" + cellName |