Skip to content

Commit

Permalink
HHH-7509 fix NPE in second level cache
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmarlow committed Aug 9, 2012
1 parent 0068625 commit 8e73bb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -90,7 +90,7 @@ public boolean equals(Object other) {
if ( this == other ) {
return true;
}
if ( hashCode != other.hashCode() || !(other instanceof CacheKey) ) {
if ( !(other instanceof CacheKey) || hashCode != other.hashCode()) {
//hashCode is part of this check since it is pre-calculated and hash must match for equals to be true
return false;
}
Expand Down
Expand Up @@ -141,7 +141,7 @@ public boolean equals(Object o) {
return true;
}

if ( hashCode != o.hashCode() || !(o instanceof NaturalIdCacheKey) ) {
if ( !(o instanceof NaturalIdCacheKey) || hashCode != o.hashCode() ) {
//hashCode is part of this check since it is pre-calculated and hash must match for equals to be true
return false;
}
Expand Down

0 comments on commit 8e73bb0

Please sign in to comment.