8141677: Improve java.lang.invoke.MemberName hashCode implementation
Reviewed-by: vlivanov, psandoz, shade
This commit is contained in:
parent
fe2786af5f
commit
8e73a2915d
@ -694,8 +694,11 @@ import java.util.Objects;
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(clazz, getReferenceKind(), name, getType());
|
||||
// Avoid autoboxing getReferenceKind(), since this is used early and will force
|
||||
// early initialization of Byte$ByteCache
|
||||
return Objects.hash(clazz, new Byte(getReferenceKind()), name, getType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
return (that instanceof MemberName && this.equals((MemberName)that));
|
||||
|
Loading…
x
Reference in New Issue
Block a user