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) {
|
public void cleanup(ResultSet resultSet) {
|
||||||
if ( collectionLoadContexts != null ) {
|
if ( collectionLoadContexts != null ) {
|
||||||
final CollectionLoadContext collectionLoadContext = collectionLoadContexts.remove( resultSet );
|
final CollectionLoadContext collectionLoadContext = collectionLoadContexts.remove( resultSet );
|
||||||
|
if ( collectionLoadContext != null ) {
|
||||||
collectionLoadContext.cleanup();
|
collectionLoadContext.cleanup();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ( entityLoadContexts != null ) {
|
if ( entityLoadContexts != null ) {
|
||||||
final EntityLoadContext entityLoadContext = entityLoadContexts.remove( resultSet );
|
final EntityLoadContext entityLoadContext = entityLoadContexts.remove( resultSet );
|
||||||
|
if ( entityLoadContext != null ) {
|
||||||
entityLoadContext.cleanup();
|
entityLoadContext.cleanup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Release internal state associated with *all* result sets.
|
* Release internal state associated with *all* result sets.
|
||||||
|
|
Loading…
Reference in New Issue