redid .equals() for CachedIntegerValueField

git-svn-id: https://smali.googlecode.com/svn/trunk@75 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2009-06-04 02:48:06 +00:00
parent 4561355e99
commit a7266ebdce

View File

@ -64,14 +64,8 @@ public abstract class CachedIntegerValueField<T extends CachedIntegerValueField>
}
public boolean equals(Object o) {
//TODO: check if this returns false if o is a different subclass
if (!this.getClass().isInstance(o)) {
return false;
}
T other = (T)o;
return getCachedValue() == other.getCachedValue();
return (this.getClass() == o.getClass()) &&
(getCachedValue() == ((CachedIntegerValueField)o).getCachedValue());
}
/**