[weld-dev] CDITCK-174 - ProcessObserverMethod type parameters

Pete Muir pmuir at redhat.com
Thu Nov 18 08:26:29 EST 2010


Hi Scott

>From the spec,

"The event object must be of type javax.enterprise.inject.spi.ProcessObserverMethod<T, X>, where T is the bean
class of the bean that declares the observer method and X is the observed event type of the observer method.

public interface ProcessObserverMethod<T, X> { 
   public AnnotatedParameter<T> getAnnotatedEventParameter(); 
   public ObserverMethod<X> getObserverMethod(); 
   public void addDefinitionError(Throwable t);
}
"

It looks like this has got completely wrong against the javadoc and signatures released with the spec, I will go to the EE CTS guys and see what the best path forward is, however I suspect it is unfixable until we do a MR. I will also go back in and fix this test so that it works correctly against the API as defined in the javadoc.

Pete




On 18 Nov 2010, at 00:07, Scott Ferguson wrote:

> Hi Pete,
> 
> I'm looking at the TCK snapshot and at CDITCK-174, but I don't 
> understand the change. The original looks correct to me and I don't see 
> how the new change is supposed to work or why it was made.
> 
> In ProcessObserverMethodErrorTest, there's a listener:
> 
> public void observeObserverMethodForEventB(
>  @Observes ProcessObserverMethod<?,EventB> event
> );
> 
> But the ProcessObserverMethod is defined as
> 
> public interface ProcessObserverMethod<T,X> {
>  public ObserverMethod<T> getObserverMethod();
>  public AnnotatedMethod<X> getAnnotatedMethod();
>  public void addDefinitionError(Throwable t);
> }
> 
> In other words, "T" is the type of the event and "X" is the type of the 
> listener, but the observer flips those around.
> 
> I double checked with the latest weld and with cdi-api.sig, but it 
> doesn't look like the ProcessObserverMethod itself has changed.
> 
> Is there something I'm missing?
> 
> -- Scott
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev




More information about the weld-dev mailing list