[ 
https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507947#comment-13507947
 ] 

Mark Struberg commented on DELTASPIKE-295:
------------------------------------------

(a instanceof b) is not the same as (b instanceof a). Jozef, do you agree?

And the CDI spec only defines the behaviour in one direction right now!
See 5.2.3 "A parameterized bean type is considered assignable to a raw required 
type if..."

The spec says NOTHING about "A parameterized REQUIRED type is considered 
assignable to ..."

Where the spec has a clear definition of
* "bean type" = the return type of the producer method
* "required type" = the type of the injection point.

If Weld2 refuses to inject that than this is a bug in Weld2-beta-something. All 
other containers (including the 10++ other Weld versions) are perfectly fine 
with it!
                
> 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
>             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

Reply via email to