@SuppressWarnings("unchecked") @Override public IdentityStore<?> createIdentityStore(IdentityStoreConfiguration config, IdentityStoreInvocationContext context) { for (Class<? extends IdentityStoreConfiguration> cc : identityConfigMap.keySet()) { if (cc.isInstance(config)) { try { IdentityStore<IdentityStoreConfiguration> store = (IdentityStore<IdentityStoreConfiguration>) identityConfigMap.get(cc).newInstance(); store.setup(config, context); return store; } catch (InstantiationException e) { throw new SecurityConfigurationException( "Exception while creating new IdentityStore instance", e); } catch (IllegalAccessException e) { throw new SecurityConfigurationException( "Exception while creating new IdentityStore instance", e); } } } throw new IllegalArgumentException( "The IdentityStoreConfiguration specified is not supported by this IdentityStoreFactory implementation"); }
store.setup(storeConfiguration);
store.setup(storeConfiguration);