mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-03-03 08:19:15 +00:00
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 Object getCollectionOwner(Serializable key, CollectionPersister collectio
|
||||
@Override
|
||||
public Object getLoadedCollectionOwnerOrNull(PersistentCollection collection) {
|
||||
final CollectionEntry ce = getCollectionEntry( collection );
|
||||
if ( ce.getLoadedPersister() == null ) {
|
||||
if ( ce == null || ce.getLoadedPersister() == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user