HHH-14175 StatefulPersistenceContext#getLoadedCollectionOwnerOrNull could NPE on missing CollectionEntry
Avoids NPE, as the collection entry could not exist.
This commit is contained in:
parent
5ecf45020f
commit
153817f426
|
@ -846,7 +846,7 @@ public class StatefulPersistenceContext implements PersistenceContext {
|
||||||
@Override
|
@Override
|
||||||
public Object getLoadedCollectionOwnerOrNull(PersistentCollection collection) {
|
public Object getLoadedCollectionOwnerOrNull(PersistentCollection collection) {
|
||||||
final CollectionEntry ce = getCollectionEntry( collection );
|
final CollectionEntry ce = getCollectionEntry( collection );
|
||||||
if ( ce.getLoadedPersister() == null ) {
|
if ( ce == null || ce.getLoadedPersister() == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue