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

Mark Struberg commented on OWB-1216:
------------------------------------

That's pretty weird. We have a test which verifies that InjectionPoint in 
producer methods work correctly: 
org.apache.webbeans.test.tests.DependentProducerMethodInjectionPointTest#testDependentProducerMethodInjectionPoint

There are also lots of TCK tests in this area and DeltaSpike also uses it 
heavily and passes.

I'd be interested in a sample to reproduce it. Can you please provide a test 
for it? txs!

> InjectionPoint.getType() returns wrong type for produced beans
> --------------------------------------------------------------
>
>                 Key: OWB-1216
>                 URL: https://issues.apache.org/jira/browse/OWB-1216
>             Project: OpenWebBeans
>          Issue Type: Bug
>            Reporter: John D. Ament
>            Assignee: Mark Struberg
>            Priority: Major
>
> Assuming I have a producer (same thing happens for a custom registered 3rd 
> party bean, this is just easier to demonstrate):
> {code}
>     public class MyProducer {
>         @Produces
>         @SomeQualifier
>         public String doProducer(InjectionPoint ip) {
>             return ip.getType().toString();
>         }
>     }
> {code}
> As well as the following injection point (with test):
> {code}    
>     @Inject
>     @SomeQualifier
>     private String myString;
>     
>     @Test
>     public void shouldBeStringType() {
>         assertThat(myString).isEqualTo(String.class.toString());
>     }
> {code}
> The expectation is that the value of {{myString}} is {{java.lang.String}} but 
> actually the value is the producer {{MyProducer}}.  We should be relying on 
> the injection point's value, not the producer class.  It seems that it uses 
> the value of {{getBeanClass}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to