HHH-8428 Protect SessionFactoryRegistry.getNamedSessionFactory(String) from NPE
This commit is contained in:
parent
5924a1b8c0
commit
70a1e23a38
|
@ -132,7 +132,11 @@ public class SessionFactoryRegistry {
|
||||||
public SessionFactory getNamedSessionFactory(String name) {
|
public SessionFactory getNamedSessionFactory(String name) {
|
||||||
LOG.debugf( "Lookup: name=%s", name );
|
LOG.debugf( "Lookup: name=%s", name );
|
||||||
final String uuid = nameUuidXref.get( name );
|
final String uuid = nameUuidXref.get( name );
|
||||||
|
if ( uuid != null ) {
|
||||||
return getSessionFactory( uuid );
|
return getSessionFactory( uuid );
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public SessionFactory getSessionFactory(String uuid) {
|
public SessionFactory getSessionFactory(String uuid) {
|
||||||
|
|
Loading…
Reference in New Issue