From: Luis Bernardo Date: Wed, 23 Jul 2014 11:58:15 +0000 (+0000) Subject: fix equality comparison between border, padding and background (see FOP-2307 comments) X-Git-Tag: fop-2_0~93 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=330ff8e5a23c06490d64504111af1491eb32236d;p=xmlgraphics-fop.git fix equality comparison between border, padding and background (see FOP-2307 comments) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1612817 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java index 755d84547..192833c8a 100644 --- a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java +++ b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java @@ -38,6 +38,7 @@ import org.apache.fop.fo.Constants; import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.expr.PropertyException; +import org.apache.fop.util.CompareUtil; /** * Stores all common border and padding properties. @@ -823,10 +824,10 @@ public class CommonBorderPaddingBackground { if (obj instanceof CommonBorderPaddingBackground) { CommonBorderPaddingBackground cbpb = (CommonBorderPaddingBackground)obj; return (this.backgroundAttachment == cbpb.backgroundAttachment - && this.backgroundColor == cbpb.backgroundColor - && this.backgroundImage.equals(cbpb.backgroundImage) - && this.backgroundPositionHorizontal == cbpb.backgroundPositionHorizontal - && this.backgroundPositionVertical == cbpb.backgroundPositionVertical + && CompareUtil.equal(backgroundColor, cbpb.backgroundColor) + && CompareUtil.equal(backgroundImage, cbpb.backgroundImage) + && CompareUtil.equal(backgroundPositionHorizontal, backgroundPositionHorizontal) + && CompareUtil.equal(backgroundPositionVertical, cbpb.backgroundPositionVertical) && this.backgroundRepeat == cbpb.backgroundRepeat && Arrays.equals(borderInfo, cbpb.borderInfo) && Arrays.equals(padding, cbpb.padding));