hibernate/hibernate-orm — pull request #549 by karlvr (2013-06-18 22:24:28+00:00)
Title: Protect SessionFactoryRegistry.getNamedSessionFactory(String) from NPE…

… when the named SessionFactory hasn't been registered.

This problem occurs because ConcurrentHashMap does not support null keys, and throws a NullPointerException.

This can occur from ProviderMBeanRegistration.locateSessionFactory() when it checks to see whether the named SessionFactory is available on a background thread. It expects a null response to indicate that the SessionFactory has not been configured yet.

This same patch applies cleanly to master.