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