[
https://issues.jboss.org/browse/JBIDE-12199?page=com.atlassian.jira.plugi...
]
Viacheslav Kabanovich edited comment on JBIDE-12199 at 8/9/12 7:16 PM:
-----------------------------------------------------------------------
EXECUTE: In a valid CDI project, create class
{code}
import javax.enterprise.context.RequestScoped;
@RequestScoped
public final class MyNormalBean {
}
{code}
Run the project on server with Weld CDI implementation.
ASSERT: Project deployment is failed with
org.jboss.weld.exceptions.UnproxyableResolutionException "WELD-001437 Normal scoped
bean class testproxy.MyNormalBean is not proxyable because the type is final or it
contains a final method class test.MyNormalBean - Managed Bean [class test.MyNormalBean]
with qualifiers [@Any @Default]."
ASSERT: Editor shows warning/error marker at the scope annotation "Bean MyNormalBean
with a normal scope cannot have as legal a type MyNormalBean (final class) that cannot be
proxied by the container [JSR-299 §5.4.1]".
EXECUTE: In a valid CDI project, create class
{code}
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Produces;
public class MyNormalBean {
@RequestScoped
@Produces
public int getInt() {
return 0;
}
}
{code}
Run the project on server with Weld CDI implementation.
ASSERT: Project deployment is failed with
org.jboss.weld.exceptions.UnproxyableResolutionException "WELD-001435 Normal scoped
bean int is not proxyable because it has no no-args constructor - Producer Method [int]
with qualifiers [@Any @Default] declared as [[method] @RequestScoped @Produces public
test.MyNormalBean.getInt()]."
ASSERT: Editor shows warning/error marker at the scope annotation "Bean
MyNormalBean.getInt() with a normal scope cannot have as legal a primitive type int that
cannot be proxied by the container [JSR-299 §5.4.1]"
Similar asserts take place for any case when one of class/producer bean's legal types
(excluding java.lang.Object) cannot be proxed by the container.
was (Author: scabanovich):
EXECUTE: In a valid CDI project, create class
{code}
import javax.enterprise.context.RequestScoped;
@RequestScoped
public final class MyNormalBean {
}
{code}
Run the project on server with Weld CDI implementation.
ASSERT: Project deployment is failed with
org.jboss.weld.exceptions.UnproxyableResolutionException "WELD-001437 Normal scoped
bean class testproxy.MyNormalBean is not proxyable because the type is final or it
contains a final method class test.MyNormalBean - Managed Bean [class test.MyNormalBean]
with qualifiers [@Any @Default]."
ASSERT: Editor shows warning/error marker at the scope annotation "Bean MyNormalBean
with a normal scope cannot have as legal a type MyNormalBean (final class) that cannot be
proxied by the container [JSR-299 §5.4.1]".
EXECUTE: In a valid CDI project, create class
{code}
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Produces;
public final class MyNormalBean {
@RequestScoped
@Produces
public int getInt() {
return 0;
}
}
{code}
Run the project on server with Weld CDI implementation.
ASSERT: Project deployment is failed with
org.jboss.weld.exceptions.UnproxyableResolutionException "WELD-001435 Normal scoped
bean int is not proxyable because it has no no-args constructor - Producer Method [int]
with qualifiers [@Any @Default] declared as [[method] @RequestScoped @Produces public
test.MyNormalBean.getInt()]."
ASSERT: Editor shows warning/error marker at the scope annotation "Bean
MyNormalBean.getInt() with a normal scope cannot have as legal a primitive type int that
cannot be proxied by the container [JSR-299 §5.4.1]"
Similar asserts take place for any case when one of class/producer bean's legal types
(excluding java.lang.Object) cannot be proxed by the container.
Validate types of a bean with a normal scope
--------------------------------------------
Key: JBIDE-12199
URL:
https://issues.jboss.org/browse/JBIDE-12199
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: CDI
Affects Versions: 3.3.0.CR1
Reporter: Viacheslav Kabanovich
Assignee: Viacheslav Kabanovich
Fix For: 3.4.0.M1
Now we check injection points with unproxyable types. However, even if a normal-scoped
bean is not injected, but has an unproxyable type, runtime reports a deployment 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