[cdi-dev] [JBoss JIRA] (CDI-508) Nested classes except for static nested classes should not be managed beans
Martin Kouba (JIRA)
issues at jboss.org
Fri Feb 27 03:20:49 EST 2015
[ https://issues.jboss.org/browse/CDI-508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Kouba updated CDI-508:
-----------------------------
Description:
The spec should explicitly state that all nested classes (inner, anonymous, local) except for static nested classes are not managed beans.
*3.1.1. Which Java classes are managed beans?* is confusing:
{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 a *non-static inner class*.
* It is a concrete class, or is annotated @Decorator.
* ...
{quote}
# A *top-level* Java class is never nested
# Term *non-static inner class* is inaccurate, static nested classes are not inner
# It seems that *concrete class* is not defined in JLS, it should be probably replaced with something like non-abstract...
was:
The spec should explicitly state that all nested classes (inner, anonymous, local) except for static nested classes are not managed beans.
*3.1.1. Which Java classes are managed beans?* is confusing:
{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 a *non-static inner class*.
{quote}
# a *top-level* Java class is never nested
# term *non-static inner class* is inaccurate, static nested classes are not inner
> Nested classes except for static nested classes should not be managed beans
> ---------------------------------------------------------------------------
>
> Key: CDI-508
> URL: https://issues.jboss.org/browse/CDI-508
> Project: CDI Specification Issues
> Issue Type: Clarification
> Affects Versions: 1.2.Final
> Reporter: Martin Kouba
>
> The spec should explicitly state that all nested classes (inner, anonymous, local) except for static nested classes are not managed beans.
> *3.1.1. Which Java classes are managed beans?* is confusing:
> {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 a *non-static inner class*.
> * It is a concrete class, or is annotated @Decorator.
> * ...
> {quote}
> # A *top-level* Java class is never nested
> # Term *non-static inner class* is inaccurate, static nested classes are not inner
> # It seems that *concrete class* is not defined in JLS, it should be probably replaced with something like non-abstract...
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the cdi-dev
mailing list