You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Jozef Hartinger (JIRA)" <ji...@apache.org> on 2013/02/27 19:27:13 UTC

[jira] [Reopened] (DELTASPIKE-295) JsfMessageProducer createJsfMessage return type should be parametrized

     [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jozef Hartinger reopened DELTASPIKE-295:
----------------------------------------


The current proposal for CDI 1.1 is to clarify the resolution rules by including the following rule:

"A raw bean type is considered assignable to a parameterized required type if the raw types are identical and all type parameters of the required type are either unbounded type variables or java.lang.Object"

That means that a bean with raw type JsfMessage would still not be assignable to an injection point with type JsfMessage<UserMessage>.

Therefore, it is probably the right time to either:
a) fix this finally in deltaspike (add an unbound type variable)
b) try to influence the CDI EG to do a last-minute change
                
> JsfMessageProducer createJsfMessage return type should be parametrized
> ----------------------------------------------------------------------
>
>                 Key: DELTASPIKE-295
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-295
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: JSF-Module
>    Affects Versions: 0.4-incubating
>         Environment: Current 0.4-incubating snapshot, Weld 2.0.0.Beta1
>            Reporter: Marek Schmidt
>            Assignee: Mark Struberg
>             Fix For: 0.4-incubating
>
>
> The 
> {code}
> public JsfMessage createJsfMessage(InjectionPoint injectionPoint)
> {code}
> should probably be
> {code}
> public <T> JsfMessage<T> createJsfMessage(InjectionPoint injectionPoint)
> {code}
> instead.
> The problem manifests itself in Weld 2.0.0.Beta1:
> {noformat}
> Tests in error: 
>   org.apache.deltaspike.test.jsf.impl.message.JsfMessageTest: Could not deploy to container: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"jsfMessageTest.war\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jsfMessageTest.war\".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [JsfMessage<UserMessage>] with qualifiers [@Default] at injection point [[BackedAnnotatedField] @Inject private org.apache.deltaspike.test.jsf.impl.message.beans.JsfMessageBackingBean.msg]"}}
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira