Skip to content

Commit e320299

Browse files
committed
HHH-19508 workaround for strange behavior related to HHH-13053
1 parent 5aeff2c commit e320299

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hibernate-core/src/main/java/org/hibernate/collection/spi/PersistentBag.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,11 @@ public Iterator<?> getDeletes(CollectionPersister persister, boolean indexIsForm
335335
public boolean hasDeletes(CollectionPersister persister) {
336336
final Type elementType = persister.getElementType();
337337
final List<?> sn = (List<?>) getSnapshot();
338+
if ( sn == null) {
339+
// workaround for missing snapshot
340+
// related to HHH-13053
341+
return false;
342+
}
338343
final Iterator<?> olditer = sn.iterator();
339344
int i = 0;
340345
final Iterator<E> bagiter = collection.iterator();

0 commit comments

Comments
 (0)