Fix NPE with DelayedCollectionInitializer

This commit is contained in:
Andrea Boriero 2021-03-08 09:28:53 +01:00
parent 711fb53505
commit f7d421b6ff
2 changed files with 0 additions and 18 deletions

View File

@ -51,8 +51,6 @@ public abstract class AbstractCollectionInitializer implements CollectionInitial
collectionAttributeMapping.getCollectionDescriptor(),
parentKey
);
parentAccess.registerResolutionListener( owner -> collectionInstance.setOwner( owner ) );
}
}

View File

@ -8,7 +8,6 @@ package org.hibernate.sql.results.graph.collection.internal;
import org.hibernate.collection.spi.CollectionSemantics;
import org.hibernate.collection.spi.PersistentCollection;
import org.hibernate.engine.spi.CollectionKey;
import org.hibernate.engine.spi.PersistenceContext;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.internal.log.LoggingHelper;
@ -96,19 +95,4 @@ public class DelayedCollectionInitializer extends AbstractCollectionInitializer
collectionInstance = null;
}
@Override
public void resolveKey(RowProcessingState rowProcessingState) {
if ( collectionKey != null ) {
// already resolved
return;
}
final Object parentKey = parentAccess.getParentKey();
if ( parentKey != null ) {
collectionKey = new CollectionKey(
collectionAttributeMapping.getCollectionDescriptor(),
parentKey
);
}
}
}