Fix NPE in the DefaultSessionFactoryLocator
**Cherry-pick to 5.2.x**
(cherry picked from commit 00b771d8a8)
This commit is contained in:
@@ -89,7 +89,9 @@ public class DefaultSessionFactoryLocator<F> implements SessionFactoryLocator<F>
|
||||
|
||||
@Override
|
||||
public SessionFactory<F> getSessionFactory(@Nullable Object key) {
|
||||
return this.factories.getOrDefault(key, this.defaultFactory);
|
||||
return key == null
|
||||
? this.defaultFactory
|
||||
: this.factories.getOrDefault(key, this.defaultFactory);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user