[ 
https://issues.apache.org/jira/browse/OWB-642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Struberg resolved OWB-642.
-------------------------------
    Resolution: Fixed

> Method WebBeansUtil.configureProducerMethodSpecializations is unreliable
> ------------------------------------------------------------------------
>
>                 Key: OWB-642
>                 URL: https://issues.apache.org/jira/browse/OWB-642
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Inheritance, Specialization
>    Affects Versions: 1.1.3
>         Environment: OWB trunk
>            Reporter: Martin Kočí
>            Assignee: Martin Kočí
>             Fix For: 1.5.0
>
>         Attachments: OWB-642-reproducibleTest.patch
>
>
> I have specialized producer method like this:
> @Produces @Specializes @MyConfigValue @Named
> public Boolean getProducerMethod() {....}
> Problem is that @Named is also at parent method -> exception "Specialized 
> method  getProducerMethod may not define @Named annotation"
> but this happens *randomly* once per 10 container starts or so.
> I tracked it down to:
>                         if (superMethod != null && 
> superMethod.equals(pb.getCreatorMethod()))
>                         {
>                             producerBeanListHelper.add(pb);
>                             pLeft = (pb.isSpecializedBean()) ? pb : null;
>                         }
>                         else
>                         {
>                             pLeft = null;
>                         }
> When I comment out the  pLeft = null;  line OWB detect problem with @Named 
> every time
> I guess that there are two or more problems together:
> 1) client problem in my code : @Named at specialized method
> 2) configureProducerMethodSpecializations is based on loop over 
> BeanManagerImpl().getBeans(), which is set  -> random order of 
> ProducerMethodBean procesing
> 3) bug in pLeft/pRight algorithm that clears pLeft with first unsuccessful 
> method match, but pLeft/pRight are used for class equality, not method 
> equality



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to