-
Bug
-
Resolution: Fixed
-
P3
-
1.2.1
-
beta
-
sparc
-
solaris_2.5.1
Name: akC57697 Date: 04/01/99
The javadoc:
"
public boolean equals(Object obj)
Compares this object to the specifed object. The result is true if and only if the
argument is not null and is a Font object with the same name, style, and point
size as this font. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^
Overrides:
equals in class Object
Parameters:
obj - the object to compare this font with.
Returns:
true if the objects are equal; false otherwise.
"
But the javadoc contradicts the code
(line 816 of StyleContext.java 1.57 98/11/17)
public boolean equals(Object obj) {
if (obj instanceof AttributeSet) {
AttributeSet attrs = (AttributeSet) obj;
return ((getAttributeCount() == attrs.getAttributeCount()) &&
containsAttributes(attrs));
}
return false;
}
It seems the javadoc comment was accidently copied from
FontKey.equals()
======================================================================