8016698: Cleanup overrides warning in sun/tools/ClassDeclaration.java
Override Object.hashCode() Reviewed-by: alanb, chegar
This commit is contained in:
parent
ffbad7e9cb
commit
0534c089d6
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user