|
Thanks for the clarification (I also stumbled upon those swapped type parameters); How does this explain though that we're note invoked if we declare the observer method as this (as you suggested):
public void processValidatorFactoryBean(@Observes ProcessBean<? extends ValidatorFactory> event)
But we are invoked when declaring it using a separate type variable:
public <P extends ProcessBean<? extends ValidatorFactory> void processValidatorFactoryBean(@Observes P event)
From a Java language perspective, both variants accept the same input, so I'd also expect both variants to be invoked for a ProcessBean<? extends ValidatorFactory> event (or sub-types thereof). May this be an issue with the resolution algorithm in Weld?
|