EXECUTE: Create a CDI project
EXECUTE: Add the following code to the project:
@Stereotype @Named @Target({ TYPE, METHOD, FIELD }) @Retention(RUNTIME) @Documented public @interface TestS { }
import javax.enterprise.inject.Produces; import javax.inject.Named; public class MyBean { @Produces @Named // Duplicate EL name public String foo4() {return "";} @Produces @TestS // Duplicate EL name public String foo4; }
ASSERT: See comments in MyBean.java. There should be a problem marker on annotation @TestS of field foo4 in MyBean.java instead of annotation @Named in TestS.java.