From 92190f82a4793f9a8a8d6441b61cb125b961b8ef Mon Sep 17 00:00:00 2001 From: Chris Bowditch Date: Fri, 29 Mar 2019 15:01:48 +0000 Subject: Resolve Findbugs warning git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1856546 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/fo/properties/OptionalCharacterProperty.java | 8 +++++--- fop-core/src/tools/resources/findbugs/exclusions.xml | 10 ++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/fop-core/src/main/java/org/apache/fop/fo/properties/OptionalCharacterProperty.java b/fop-core/src/main/java/org/apache/fop/fo/properties/OptionalCharacterProperty.java index 73c1f8626..2d67dbef0 100644 --- a/fop-core/src/main/java/org/apache/fop/fo/properties/OptionalCharacterProperty.java +++ b/fop-core/src/main/java/org/apache/fop/fo/properties/OptionalCharacterProperty.java @@ -101,9 +101,11 @@ public final class OptionalCharacterProperty extends Property { public boolean equals(Object obj) { if (obj instanceof OptionalCharacterProperty) { OptionalCharacterProperty ocp = (OptionalCharacterProperty) obj; - return character == ocp.character - || character != null - && character.equals(ocp.character); + if (character == null && ocp.character == null) { + return true; + } else { + return (character != null && character.equals(ocp.character)); + } } else { return false; } diff --git a/fop-core/src/tools/resources/findbugs/exclusions.xml b/fop-core/src/tools/resources/findbugs/exclusions.xml index c78ba0577..facf7a400 100644 --- a/fop-core/src/tools/resources/findbugs/exclusions.xml +++ b/fop-core/src/tools/resources/findbugs/exclusions.xml @@ -413,6 +413,16 @@ + + + + + + + + + + -- cgit v1.2.3