-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clarify the definition of the (unrestricted) set of bean types #645
Comments
See also the related https://issues.redhat.com/browse/CDITCK-416 and https://issues.redhat.com/browse/WELD-1740.
👍 |
@mkouba The CDITCK project isn't visible anymore. It would be great if it could become visible again, because it has a lot of history and discussions. Does it still exist? |
It still exists; as far as I know, it's read-only. Maybe you need to be logged in? |
That's weird. When I log into the Red Hat JIRA, I can see CDITCK-416 just fine. I even get a warning that This is a public project. 🤷 |
Maybe it isn't accessible to non-Red Hat people because the project is also archived...? |
Same here, I can see it after login. |
Amazingly, I can see https://issues.redhat.com/browse/CDI even without being logged in. But logged in or not, I can't access https://issues.redhat.com/browse/CDITCK |
I've tried to reach out to the administration team of JIRA to see what's happening but I have no idea how long it may take to get an answer or a fix. |
The JIRA accessibility issue should now be solved - it can be viewed again even without logging in. |
For managed bean, the unrestricted set of bean types is defined as:
Similar wording exists for producer methods and fields.
This is imprecise, because classes don't extend classes and implement interfaces -- they extend class types and implement interface types! This distinction matters in presence of parameterized types and also raw types.
For example, if I have a class
class MyList extends ArrayList<String> { ... }
, then its superclass isArrayList
, but its superclass type isArrayList<String>
.It is clear from the examples in the specification, as well as from tests in the TCK, that the intended meaning is that the unrestricted set of bean types contains all supertypes of the bean class as defined by the Java Language Specification. Specificially for the text above, I'd suggest this rewording:
EDIT: actually not supertypes, but superclass types and superinterface types. Supertypes are something slightly different (for example, each parameterized type
G<T1, T2, ..., Tn>
has the raw typeG
as its supertype).It might also be beneficial to highlight the following provision from the JLS:
However, we shouldn't really copy half of JLS into CDI, so this is perhaps a bit too much. Delegating to JLS should be enough, in any case.
The text was updated successfully, but these errors were encountered: