From 7601beb5921fa38fe654ebf8f26d717a4e1966ee Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Sun, 14 Jul 2024 11:26:43 +0000 Subject: Bug 66425: Avoid exceptions found via poi-fuzz Prevent a NullPointerException Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70273 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919213 13f79535-47bb-0310-9956-ffa450edef68 --- poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'poi-ooxml') diff --git a/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java index ef363efc8e..11621ded35 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java @@ -73,9 +73,9 @@ public abstract class XDGFSheet { for (SectionType section: sheet.getSectionArray()) { String name = section.getN(); - if (name.equals("Geometry")) { + if ("Geometry".equals(name)) { _geometry.put(section.getIX(), new GeometrySection(section, this)); - } else if (name.equals("Character")) { + } else if ("Character".equals(name)) { _character = new CharacterSection(section, this); } else { _sections.put(name, XDGFSection.load(section, this)); -- cgit v1.2.3