HHH-14574 Avoid NPEs from LoadContexts.cleanup(ResultSet)
This commit is contained in:
parent
26e858c78b
commit
fc3accfbd1
|
@ -78,11 +78,15 @@ public class LoadContexts {
|
|||
public void cleanup(ResultSet resultSet) {
|
||||
if ( collectionLoadContexts != null ) {
|
||||
final CollectionLoadContext collectionLoadContext = collectionLoadContexts.remove( resultSet );
|
||||
collectionLoadContext.cleanup();
|
||||
if ( collectionLoadContext != null ) {
|
||||
collectionLoadContext.cleanup();
|
||||
}
|
||||
}
|
||||
if ( entityLoadContexts != null ) {
|
||||
final EntityLoadContext entityLoadContext = entityLoadContexts.remove( resultSet );
|
||||
entityLoadContext.cleanup();
|
||||
if ( entityLoadContext != null ) {
|
||||
entityLoadContext.cleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue