Status: Resolved (View Workflow)
Affects Version/s: 3.1.1.Final
Fix Version/s: 3.1.2.Final
A bean archive contains a bean class that is (as a post-compilation step) instrumented by ByteBuddy bytecode manipulation framework. As a consequence, certain hidden methods are added to the .class file; when examined with javap tool, these method generally look like:
The methods are synthetic, final and package-private. This combination of attributes causes exception
WELD-001480: Bean type
class com.acme.SomeClass is not proxyable because it contains a final method final java.util.Queue com.acme.SomeClass.someMethod$__orig$accessor$h7Z5pZSX(java.util.List,java.util.Set)
I have determined that this is due to a check in org.jboss.weld.util.reflection.Reflections#getNonPrivateNonStaticFinalMethod() where only final, private and static method attributes are tested, disregarding synthetic attribute. However, according to a discussion at StackOverflow, dependency injection frameworks ought to ignore synthetic members.
I have locally modified Weld Core, class org.jboss.weld.util.reflection.Reflections, method getNonPrivateNonStaticMethod() as follows:
This solution was then tested and appears to work correctly.