[cdi-dev] [JBoss JIRA] (CDI-470) Clarify @Vetoed on recursive package
Martin Kouba (JIRA)
issues at jboss.org
Mon Sep 15 02:57:02 EDT 2014
[ https://issues.jboss.org/browse/CDI-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002163#comment-13002163 ]
Martin Kouba commented on CDI-470:
----------------------------------
In my opinion, it is clear that {{@Vetoed}} only applies to the "current package". The spec simply states that the class must be "in a package":
{quote}
A top-level Java class is a managed bean if it is defined to be a managed bean by any other Java EE specification, or if it meets all of the following conditions:
* ...
* It is not annotated @Vetoed or in a package annotated @Vetoed.
* ...
{quote}
See also "3.1.1. Which Java classes are managed beans" (and similarly for session beans). AFAIK the Java lang does not define the relation between the package and its subpackages from the visibility point of view, nor provides a Reflection API to work with subpackages.
> Clarify @Vetoed on recursive package
> ------------------------------------
>
> Key: CDI-470
> URL: https://issues.jboss.org/browse/CDI-470
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Beans
> Affects Versions: 1.2.Final
> Reporter: Antonio Goncalves
>
> It's not clear in the specification is {{@Vetoed}} only apply to the current package or subpackages as well. This has been addressed on [CDI-299] but not solved. Either, we make it clearer in the spec that it only addresses the current package and not subpackages, or we could have a boolean, such as {{recursive}} :
> {code:title=package-info.java}
> @Vetoed(recursive=true)
> package my.parent.package;
> import javax.enterprise.inject.Vetoed;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
More information about the cdi-dev
mailing list