Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1.3
-
None
-
OWB trunk
Description
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