deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jozef Hartinger (JIRA)" <>
Subject [jira] [Commented] (DELTASPIKE-295) JsfMessageProducer createJsfMessage return type should be parametrized
Date Mon, 03 Dec 2012 07:25:58 GMT


Jozef Hartinger commented on DELTASPIKE-295:

> All other containers (including the 10++ other Weld versions) are perfectly fine with
Yes, I am aware of that and it concerns me.

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

Do you say that it is unspecified? Portable application should not really depend on unspecified
behavior then. :-)
Let's leave the clarification on the CDI EG. 

However, regardless of the resolution of the CDI issue (even if Weld 2 ends up supporting
this use case again), I still think that the proposed solution is slightly better:

public <T> JsfMessage<T> createJsfMessage(InjectionPoint injectionPoint)

I think this way is better because:
- It is explicitly defined in the CDI spec (5.2.3 bullet 4)
- Unlike the current solution, this one does not use raw types which are strongly discouraged
by the JLS ("The use of raw types is allowed only as a concession to compatibility of legacy
code. The use of raw types in code written after the introduction of genericity into the Java
programming language is strongly discouraged. It is possible that future versions of the Java
programming language will disallow the use of raw types.")

Please consider this change once again.
> 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
>            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:

View raw message