8016698: Cleanup overrides warning in sun/tools/ClassDeclaration.java

Override Object.hashCode()

Reviewed-by: alanb, chegar
This commit is contained in:
Kurchi Subhra Hazra 2013-06-19 14:13:41 -07:00
parent ffbad7e9cb
commit 0534c089d6

View File

@ -230,12 +230,17 @@ class ClassDeclaration implements Constants {
* Equality
*/
public boolean equals(Object obj) {
if ((obj != null) && (obj instanceof ClassDeclaration)) {
if (obj instanceof ClassDeclaration) {
return type.equals(((ClassDeclaration)obj).type);
}
return false;
}
@Override
public int hashCode() {
return type.hashCode();
}
/**
* toString
*/