HHH-8428 Protect SessionFactoryRegistry.getNamedSessionFactory(String) from NPE

This commit is contained in:
Karl von Randow 2013-06-18 15:12:43 -07:00 committed by Brett Meyer
parent 5924a1b8c0
commit 70a1e23a38
1 changed files with 5 additions and 1 deletions

View File

@ -132,7 +132,11 @@ public class SessionFactoryRegistry {
public SessionFactory getNamedSessionFactory(String name) {
LOG.debugf( "Lookup: name=%s", name );
final String uuid = nameUuidXref.get( name );
return getSessionFactory( uuid );
if ( uuid != null ) {
return getSessionFactory( uuid );
} else {
return null;
}
}
public SessionFactory getSessionFactory(String uuid) {