KEYCLOAK-5702 kcadm delete realm fails with nullpointer
This commit is contained in:
parent
dae0fafc8a
commit
7035a4647d
1 changed files with 3 additions and 0 deletions
|
@ -82,6 +82,9 @@ public class UserStorageManager implements UserProvider, OnUserCache, OnCreateCo
|
|||
UserStorageProvider instance = (UserStorageProvider)session.getAttribute(model.getId());
|
||||
if (instance != null) return instance;
|
||||
instance = factory.create(session, model);
|
||||
if (instance == null) {
|
||||
throw new IllegalStateException("UserStorageProvideFactory (of type " + factory.getClass().getName() + ") produced a null instance");
|
||||
}
|
||||
session.enlistForClose(instance);
|
||||
session.setAttribute(model.getId(), instance);
|
||||
return instance;
|
||||
|
|
Loading…
Reference in a new issue