[cdi-dev] [JBoss JIRA] (CDI-470) Clarify @Vetoed on recursive package

Pete Muir (JIRA) issues at jboss.org
Mon Sep 15 05:59:02 EDT 2014


    [ https://issues.jboss.org/browse/CDI-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002253#comment-13002253 ] 

Pete Muir commented on CDI-470:
-------------------------------

It only applies to the current package, and not to subpackages. Taxonomically, Java does not define subpackages as a type of package, but as a unique indentity - take a look the Java Language Specification. However, in common usage, this definition has become blurred, so I think we could add a note to the spec here, that makes this point.

Recursive vetoing is possibly interesting, but note that the note

{quote}
When placed on package, all beans in the package are prevented from being installed. If packages are split across jars, non-portable behavior results. An application can prevent packages being split across jars by sealing the package
{quote}

would need to apply to subpackage. IOW all packages and subpackages must be in the same JAR. Java provides no way to enforce this unfortunately.

> 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