deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Struberg (JIRA)" <>
Subject [jira] [Commented] (DELTASPIKE-295) JsfMessageProducer createJsfMessage return type should be parametrized
Date Fri, 30 Nov 2012 12:51:58 GMT


Mark Struberg commented on DELTASPIKE-295:

>BTW I don't see any statement like "if not defined, standard Java rules apply" there.

Do you prefer applying VisualBasic rules instead? :)

After all CDI is a Java spec ...

Please go back and read the whole 5.2 section again. This handles the _bean types_ which means
the return type of the producer method in our case. It doesnt say anything specifc about parameterized
'required types'. If the producer method bean type isn't a parameterized type then native
typing rule apply: "The bean has a bean type that matches the required type."

We could probably return JsfMessage<?> to make Weld2 happy. But I still think this is
a bug in Weld2! 
Of course we CANNOT return JsfMessage<T> as this would probably also require InjectionPoint
to be a parameterized InjectionPoint<T> type to support all use cases.

> JsfMessageProducer createJsfMessage return type should be parametrized
> ----------------------------------------------------------------------
>                 Key: DELTASPIKE-295
>                 URL:
>             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:

View raw message