[cdi-dev] [JBoss JIRA] (CDI-70) Clarify that if an extension provides an Annotated* then it is considered "metadata complete"
Martin Kouba (Commented) (JIRA)
jira-events at lists.jboss.org
Tue Dec 13 08:32:09 EST 2011
[ https://issues.jboss.org/browse/CDI-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650438#comment-12650438 ]
Martin Kouba commented on CDI-70:
---------------------------------
It's not clear from my point of view. If we say that the container must call AnnotatedType.getConstructors() to determine the members (constructors) of a bean class, IMO we declare that the container should not inspect the bean class via reflection to discover any constructors at all. The spec also states that "AnnotatedType.getConstructors() - returns all the constructors declared for the type".
We should either modify spec to explicitly mention the default constructor: "AnnotatedType.getConstructors() - returns all the constructors declared for the type; if an empty set is returned, a default constructor with no parameters will be assumed" or modify javadoc to align with spec.
BTW current Weld impl does not "assume" default constructor with no parameters if original AnnotatedType is replaced during processing of ProcessAnnotatedType event.
> Clarify that if an extension provides an Annotated* then it is considered "metadata complete"
> ---------------------------------------------------------------------------------------------
>
> Key: CDI-70
> URL: https://issues.jboss.org/browse/CDI-70
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Portable Extensions
> Affects Versions: 1.0
> Reporter: Pete Muir
> Assignee: Pete Muir
> Fix For: 1.1.EDR1
>
>
> I think the correct behavior is to ignore any members that are missing from the AnnotatedType. You should not be directly accessing the reflection API at all. If the parameters for a method or a constructor don't match the underlying class, it should be considered a definition error.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the cdi-dev
mailing list