Author: lbernardo
Date: Wed Jul 23 11:58:15 2014
New Revision: 1612817
URL: http://svn.apache.org/r1612817
Log:
fix equality comparison between border, padding and background (see FOP-2307
comments)
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java?rev=1612817&r1=1612816&r2=1612817&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
Wed Jul 23 11:58:15 2014
@@ -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 CommonBorderPaddingBackgrou
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));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]