Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed

Conversation

karlvr
Copy link
Contributor

@karlvr karlvr commented Jun 18, 2013

… 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.

… 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.
@brmeyer
Copy link
Member

brmeyer commented Aug 6, 2013

@brmeyer
Copy link
Member

brmeyer commented Aug 6, 2013

Thanks much! Merging...

@brmeyer brmeyer closed this Aug 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants