HHH-14574 Avoid NPEs from LoadContexts.cleanup(ResultSet)
This commit is contained in:
parent
26e858c78b
commit
fc3accfbd1
|
@ -78,13 +78,17 @@ public class LoadContexts {
|
|||
public void cleanup(ResultSet resultSet) {
|
||||
if ( collectionLoadContexts != null ) {
|
||||
final CollectionLoadContext collectionLoadContext = collectionLoadContexts.remove( resultSet );
|
||||
if ( collectionLoadContext != null ) {
|
||||
collectionLoadContext.cleanup();
|
||||
}
|
||||
}
|
||||
if ( entityLoadContexts != null ) {
|
||||
final EntityLoadContext entityLoadContext = entityLoadContexts.remove( resultSet );
|
||||
if ( entityLoadContext != null ) {
|
||||
entityLoadContext.cleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Release internal state associated with *all* result sets.
|
||||
|
|
Loading…
Reference in New Issue