Fix NPE with empty PersistentList

This commit is contained in:
Andrea Boriero 2020-08-18 15:05:03 +01:00
parent 520cb95fa6
commit 2cd869c73b
1 changed files with 1 additions and 4 deletions

View File

@ -30,7 +30,7 @@ public class LoadingCollectionEntryImpl implements LoadingCollectionEntry {
private final Object key;
private final PersistentCollection collectionInstance;
private List loadingState;
private List loadingState = new ArrayList();
public LoadingCollectionEntryImpl(
CollectionPersister collectionDescriptor,
@ -68,9 +68,6 @@ public class LoadingCollectionEntryImpl implements LoadingCollectionEntry {
@Override
public void load(Consumer<List> loadingEntryConsumer) {
if ( loadingState == null ) {
loadingState = new ArrayList();
}
loadingEntryConsumer.accept( loadingState );
}