]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
fix equality comparison between border, padding and background (see FOP-2307 comments)
authorLuis Bernardo <lbernardo@apache.org>
Wed, 23 Jul 2014 11:58:15 +0000 (11:58 +0000)
committerLuis Bernardo <lbernardo@apache.org>
Wed, 23 Jul 2014 11:58:15 +0000 (11:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1612817 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java

index 755d84547e53888dede1a460e0bfc2558704d90e..192833c8ae8148bc130e699812e04759333f4b47 100644 (file)
@@ -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));