[ 
https://issues.apache.org/jira/browse/OWB-493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976635#action_12976635
 ] 

David Jencks commented on OWB-493:
----------------------------------

More info:  

T - The class of the return type of the producer method (Cow in the test)
X - The class of the bean representing the producer method (CowShed in the 
test, having the producer method)

ProcessProducerMethod<T,X>
extends ProcessBean<X>

methods:

AnnotatedParameter<T>   getAnnotatedDisposedParameter() 
AnnotatedMethod<T>      getAnnotatedProducerMethod() 

Note that these are on T, the return type of the producer method (Cow in the 
test)

Looking at AnnotatedMethod<X>,

Type Parameters:
    X - the declaring type

Represents a method of a Java type.

java.lang.reflect.Method        getJavaMember()
          Get the underlying Method.

This is supposed to represent the producer method on X (CowShed), but it's 
specified to be on T (Cow).  So I think it has to return null and/or the test 
should be disabled.

Similarly for the AnnotatedParameter.

thoughts?



> ProcessProducerMethod and ProcessProducerField type parameters are reversed 
> in filtering (?)  CDITCK-168
> --------------------------------------------------------------------------------------------------------
>
>                 Key: OWB-493
>                 URL: https://issues.apache.org/jira/browse/OWB-493
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Events
>    Affects Versions: 1.1.0
>            Reporter: David Jencks
>            Assignee: Gurkan Erdogdu
>             Fix For: 1.1.0
>
>
> See https://jira.jboss.org/browse/CDITCK-168
> The tck extensions.processBean.ProcessBeanTest test had a couple errors where 
>  ProcessProducerMethod<Cowshed, Cow> was treated as a ProcessMethod<Cowshed> 
> whereas it is a ProcessMethod<Cow>, and similarly for ProcessProducerField.
> OWB seems to be subject to the same error.
>    public void observeCowProcessProducerMethod(@Observes 
> ProcessProducerMethod<Cowshed, Cow> event)
> is getting called correctly for the ProcessProducerMethod, but 
>    public void observeCowShedProccesBean(@Observes ProcessBean<Cowshed> event)
> is getting called with the same event.
> I haven't been able to figure out where the problem is.
> The corrected test is in 1.0.2.CR3

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to