ProcessBean<T> event = eventIn; // JDK8 u60 workaround
Optional<EmbeddedIdentityStoreDefinition> optionalEmbeddedStore = getAnnotation(beanManager, event.getAnnotated(), EmbeddedIdentityStoreDefinition.class);
if (optionalEmbeddedStore.isPresent()) {
identityStoreBean = new CdiProducer<IdentityStore>()
.scope(ApplicationScoped.class)
<BUG>.types(IdentityStore.class)

.addToId(EmbeddedIdentityStoreDefinition.class)</BUG>
.create(e -> new EmbeddedIdentityStore(optionalEmbeddedStore.get().value()));
}

ProcessBean<T> event = eventIn; // JDK8 u60 workaround
Optional<EmbeddedIdentityStoreDefinition> optionalEmbeddedStore = getAnnotation(beanManager, event.getAnnotated(), EmbeddedIdentityStoreDefinition.class);
if (optionalEmbeddedStore.isPresent()) {
identityStoreBean = new CdiProducer<IdentityStore>()
.scope(ApplicationScoped.class)
.beanClass(IdentityStore.class)
.types(Object.class, IdentityStore.class, EmbeddedIdentityStore.class)
.addToId(EmbeddedIdentityStoreDefinition.class)
.create(e -> new EmbeddedIdentityStore(optionalEmbeddedStore.get().value()));
}
