mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-18 09:05:21 +00:00
HHH-18122 added check of the arg type into equals()
This commit is contained in:
parent
638466fa8c
commit
2b965f6c65
@ -225,6 +225,9 @@ public int hashCode() {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
|
if (!(o instanceof HashEntry)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// HashEntry is internal class, never leaks out of CHM, hence slight optimization
|
// HashEntry is internal class, never leaks out of CHM, hence slight optimization
|
||||||
if ( this == o ) {
|
if ( this == o ) {
|
||||||
return true;
|
return true;
|
||||||
@ -484,6 +487,9 @@ public int hashCode() {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
|
if (!(o instanceof LIRSHashEntry)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// HashEntry is internal class, never leaks out of CHM, hence slight optimization
|
// HashEntry is internal class, never leaks out of CHM, hence slight optimization
|
||||||
if ( this == o ) {
|
if ( this == o ) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -840,6 +840,9 @@ public int hashCode() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
|
if (!(other instanceof ForeignKeyKey)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ForeignKeyKey fkk = (ForeignKeyKey) other;
|
ForeignKeyKey fkk = (ForeignKeyKey) other;
|
||||||
return fkk != null
|
return fkk != null
|
||||||
&& Arrays.equals( fkk.columns, columns )
|
&& Arrays.equals( fkk.columns, columns )
|
||||||
|
@ -126,6 +126,10 @@ public int hashCode() {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(@Nullable Object other) {
|
public boolean equals(@Nullable Object other) {
|
||||||
|
if (!(other instanceof NavigablePath)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ( this == other ) {
|
if ( this == other ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -642,6 +642,9 @@ public ArrayCacheKey(SqmExpressible<?>[] components) {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
|
if (!(o instanceof ArrayCacheKey)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return Arrays.equals( components, ((ArrayCacheKey) o).components );
|
return Arrays.equals( components, ((ArrayCacheKey) o).components );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user