[
https://issues.jboss.org/browse/CDI-318?page=com.atlassian.jira.plugin.sy...
]
Martin Kouba commented on CDI-318:
----------------------------------
Actually this is not a real issue but rather a hint for clarification.
An example:
{code}
@Target({ TYPE, METHOD, PARAMETER, FIELD, CONSTRUCTOR })
@Retention(RUNTIME)
@Inherited
public @interface Marker {
}
@Marker
public interface Foo {
}
public class Bar implements Foo {
}
{code}
and observer:
{code}
public void observeMarker(@WithAnnotations({ Marker.class }) @Observes
ProcessAnnotatedType<?> pat) {
}
{code}
I think PAT for Bar should be observed because @Marker is inherited (CDI follows JSL rules
here). The question is whether this makes sense because "A bean may inherit
type-level metadata and members from its superclasses", not superinterfaces.
@WithAnnotations types can appear on any supertype
--------------------------------------------------
Key: CDI-318
URL:
https://issues.jboss.org/browse/CDI-318
Project: CDI Specification Issues
Issue Type: Clarification
Reporter: Martin Kouba
Priority: Minor
Labels: cdi-1.1-mr
Is this intentional? Supertypes also include interfaces which are not very useful here as
beans may inherit type-level metadata and members from superclasses only.
Is there any special use-case for this?
--
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