Skip to content

Commit 010a94b

Browse files
committed
HHH-8428 comment & cleanup
1 parent 70a1e23 commit 010a94b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryRegistry.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,8 @@ public void removeSessionFactory(
132132
public SessionFactory getNamedSessionFactory(String name) {
133133
LOG.debugf( "Lookup: name=%s", name );
134134
final String uuid = nameUuidXref.get( name );
135-
if ( uuid != null ) {
136-
return getSessionFactory( uuid );
137-
} else {
138-
return null;
139-
}
135+
// protect against NPE -- see HHH-8428
136+
return uuid == null ? null : getSessionFactory( uuid );
140137
}
141138

142139
public SessionFactory getSessionFactory(String uuid) {

0 commit comments

Comments
 (0)