提交 3c17034b 编写于 作者: K khazra

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

Summary: Override Object.hashCode()
Reviewed-by: alanb, chegar
上级 b4e9fd77
...@@ -230,12 +230,17 @@ class ClassDeclaration implements Constants { ...@@ -230,12 +230,17 @@ class ClassDeclaration implements Constants {
* Equality * Equality
*/ */
public boolean equals(Object obj) { public boolean equals(Object obj) {
if ((obj != null) && (obj instanceof ClassDeclaration)) { if (obj instanceof ClassDeclaration) {
return type.equals(((ClassDeclaration)obj).type); return type.equals(((ClassDeclaration)obj).type);
} }
return false; return false;
} }
@Override
public int hashCode() {
return type.hashCode();
}
/** /**
* toString * toString
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册