Issue Type: Bug Bug
Affects Versions: 1.1.11.Final
Assignee: Jozef Hartinger
Components: Producers (Methods, Fields and Disposers)
Created: 18/Mar/13 4:08 AM
Description:

Suppose there is a specialized producer method (with @Produces and @Specializes annotations) that overrides its superclass's producer method. If you add a method to the superclass, Weld fails to find the overridden producer method on JDK 1.7. The same program works on JDK 1.6.

Here is the stack trace from a test case.
-------------------------------------------------------------------------------
Test set: com.example.test.SpecializedProducerTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.845 sec <<< FAILURE!
com.example.test.SpecializedProducerTest Time elapsed: 0 sec <<< ERROR!
org.jboss.weld.exceptions.IllegalStateException: WELD-000078 Specialized producer method does not override a method on the direct superclass: Producer Method [TestBean3] with qualifiers [@Any @Default] declared as [[method] @Produces @Specializes public com.example.test.SpecializedProducer$TestProducer3.testBean()]
at org.jboss.weld.bean.ProducerMethod.specialize(ProducerMethod.java:252)
at org.jboss.weld.bean.AbstractBean.initialize(AbstractBean.java:125)
at org.jboss.weld.bean.AbstractReceiverBean.initialize(AbstractReceiverBean.java:50)
at org.jboss.weld.bean.AbstractProducerBean.initialize(AbstractProducerBean.java:182)
at org.jboss.weld.bean.ProducerMethod.initialize(ProducerMethod.java:115)
at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploy(AbstractBeanDeployer.java:116)
at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:217)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:357)
at org.jboss.arquillian.container.weld.se.embedded_1_1.WeldSEContainer.deploy(WeldSEContainer.java:136)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...

Environment: Fedra 17, OpenJDK 1.6.0_37, OpenJDK 1.7.0_09
Project: Weld
Priority: Major Major
Reporter: Osamu Nagano
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
weld-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-issues

Reply via email to