Kaynağa Gözat

Fix: add implementation of hashCode() and equals() to NumberProperty, to make the caching work as expected.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@557612 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-0_95beta
Andreas L. Delmelle 17 yıl önce
ebeveyn
işleme
57edd2c7df

+ 16
- 0
src/java/org/apache/fop/fo/properties/NumberProperty.java Dosyayı Görüntüle

return Color.black; return Color.black;
} }


/** {@inheritDoc} */
public int hashCode() {
return number.hashCode();
}
/** {@inheritDoc} */
public boolean equals(Object o) {
if (o != null && o instanceof NumberProperty) {
NumberProperty np = (NumberProperty) o;
return (np.number == this.number
|| (this.number != null
&& this.number.equals(np.number)));
} else {
return false;
}
}
} }

Loading…
İptal
Kaydet