HHH-7253 NPE thrown by NaturalIdResolutionCache
This commit is contained in:
parent
5671de517d
commit
a67c1afe10
|
@ -441,6 +441,9 @@ public class NaturalIdXrefDelegate {
|
|||
}
|
||||
|
||||
public boolean sameAsCached(Serializable pk, Object[] naturalIdValues) {
|
||||
if ( pk == null ) {
|
||||
return false;
|
||||
}
|
||||
final CachedNaturalId initial = pkToNaturalIdMap.get( pk );
|
||||
if ( initial != null ) {
|
||||
if ( initial.isSame( naturalIdValues ) ) {
|
||||
|
@ -451,6 +454,9 @@ public class NaturalIdXrefDelegate {
|
|||
}
|
||||
|
||||
public boolean cache(Serializable pk, Object[] naturalIdValues) {
|
||||
if ( pk == null ) {
|
||||
return false;
|
||||
}
|
||||
final CachedNaturalId initial = pkToNaturalIdMap.get( pk );
|
||||
if ( initial != null ) {
|
||||
if ( initial.isSame( naturalIdValues ) ) {
|
||||
|
|
Loading…
Reference in New Issue