We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70a1e23 commit 010a94bCopy full SHA for 010a94b
hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryRegistry.java
@@ -132,11 +132,8 @@ public void removeSessionFactory(
132
public SessionFactory getNamedSessionFactory(String name) {
133
LOG.debugf( "Lookup: name=%s", name );
134
final String uuid = nameUuidXref.get( name );
135
- if ( uuid != null ) {
136
- return getSessionFactory( uuid );
137
- } else {
138
- return null;
139
- }
+ // protect against NPE -- see HHH-8428
+ return uuid == null ? null : getSessionFactory( uuid );
140
}
141
142
public SessionFactory getSessionFactory(String uuid) {
0 commit comments