You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Marek Schmidt (JIRA)" <ji...@apache.org> on 2012/11/29 16:48:58 UTC

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

Marek Schmidt created DELTASPIKE-295:
----------------------------------------

             Summary: 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

Re: [jira] [Created] (DELTASPIKE-295) JsfMessageProducer createJsfMessage return type should be parametrized

Posted by Mark Struberg <st...@yahoo.de>.
hmm doesn't this info get erased anyway?

This used to work fine in all other containers.
I'm fine with changing this if it still works with all the other containers.


LieGrue,
strub



----- Original Message -----
> From: Marek Schmidt (JIRA) <ji...@apache.org>
> To: deltaspike-dev@incubator.apache.org
> Cc: 
> Sent: Thursday, November 29, 2012 4:48 PM
> Subject: [jira] [Created] (DELTASPIKE-295) JsfMessageProducer createJsfMessage return type should be parametrized
> 
> Marek Schmidt created DELTASPIKE-295:
> ----------------------------------------
> 
>              Summary: 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
> 

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

Posted by "Martin Kouba (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507225#comment-13507225 ] 

Martin Kouba edited comment on DELTASPIKE-295 at 11/30/12 9:51 AM:
-------------------------------------------------------------------

I think this violates the spec. A raw type (@Produces JsfMessage) is not assignable to a parameterized type (@Inject JsfMessage<UserMessage>).

I will add a new test to CDI TCK 1.1 for this.
                
      was (Author: mkouba):
    I think this violates the spec. A raw type ({{@Produces JsfMessage}}) is not assignable to a parameterized type ({{@Inject JsfMessage<UserMessage>}}).

I will add a new test to CDI TCK 1.1 for this.
                  
> 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

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

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ 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

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

Posted by "Jozef Hartinger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508525#comment-13508525 ] 

Jozef Hartinger commented on DELTASPIKE-295:
--------------------------------------------

> All other containers (including the 10++ other Weld versions) are perfectly fine with it!
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: 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

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

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507244#comment-13507244 ] 

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

To fix this properly CDI would imo need to introduce a parameterized type InjectionPoint<T>. In any case the behaviour you try to push into the CDI TCK doesn't sound kosher at the first glance.
                
> 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

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

Posted by "Jozef Hartinger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507240#comment-13507240 ] 

Jozef Hartinger commented on DELTASPIKE-295:
--------------------------------------------

CDI 1.0 Section 5.2 Typesafe resolution says:

{quote}Parameterized and raw types are considered to match if they are identical or if the bean type is assignable to
the required type, as defined in Section 5.2.3, “Assignability of raw and parameterized types”{quote}

The bean type is not identical to the required type nor are these types defined as assignable  in 5.2.3

I hope introducing the type variable to the producer method won't break other containers as otherwise we have a problem.
                
> 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

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

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved DELTASPIKE-295.
--------------------------------------

    Resolution: Not A Problem
      Assignee: Mark Struberg
    
> 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

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

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507255#comment-13507255 ] 

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

Exactly Jozef. You already pointed to 5.2.3. But now read that paragraph again:

"A parameterized bean type is considered assignable to a raw required type"

There is nothing which restricts tthe other direction: the assignability of raw types to parameterized types. Thus standard Java rules apply.
                
> 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

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

Posted by "Jozef Hartinger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507240#comment-13507240 ] 

Jozef Hartinger edited comment on DELTASPIKE-295 at 11/30/12 10:15 AM:
-----------------------------------------------------------------------

CDI 1.0 Section 5.2 Typesafe resolution says:

"Parameterized and raw types are considered to match if they are identical or if the bean type is assignable to
the required type, as defined in Section 5.2.3, “Assignability of raw and parameterized types"

The bean type is not identical to the required type nor are these types defined as assignable  in 5.2.3

I hope introducing the type variable to the producer method won't break other containers as otherwise we have a problem.
                
      was (Author: jharting):
    CDI 1.0 Section 5.2 Typesafe resolution says:

{quote}Parameterized and raw types are considered to match if they are identical or if the bean type is assignable to
the required type, as defined in Section 5.2.3, “Assignability of raw and parameterized types”{quote}

The bean type is not identical to the required type nor are these types defined as assignable  in 5.2.3

I hope introducing the type variable to the producer method won't break other containers as otherwise we have a problem.
                  
> 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

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

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507238#comment-13507238 ] 

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

Hell, why does it violate the spec? It gets erased anyway at runtime! This is perfectly fine from a Java Lang perspective and the CDI spec must not breach native Java lang contracts.
                
> 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

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

Posted by "Peter Muir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508796#comment-13508796 ] 

Peter Muir commented on DELTASPIKE-295:
---------------------------------------

In plain Java, it's not recommended to refer to a parameterized type using it's raw type. Given that we should always promote best practices, I think there is a good argument for changing this, assuming it works across containers.
                
> 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

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

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507175#comment-13507175 ] 

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

Well, I'm a bit reluctant as Weld-2.0.0.Beta1 had quite some issues...
If we make sure that it still works with all older containers then I'm fine. If they blow off then -1.
                
> 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

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

Posted by "Marek Schmidt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507166#comment-13507166 ] 

Marek Schmidt commented on DELTASPIKE-295:
------------------------------------------

Yes, sorry, I should have written that in future perfect..  "The problem mayan manifestan on-when in Weld 2.0.0.Beta1"
                
> 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

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

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507302#comment-13507302 ] 

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: 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

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

Posted by "Martin Kouba (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507225#comment-13507225 ] 

Martin Kouba commented on DELTASPIKE-295:
-----------------------------------------

I think this violates the spec. A raw type ({{@Produces JsfMessage}}) is not assignable to a parameterized type ({{@Inject JsfMessage<UserMessage>}}).

I will add a new test to CDI TCK 1.1 for this.
                
> 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

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

Posted by "Jozef Hartinger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507315#comment-13507315 ] 

Jozef Hartinger commented on DELTASPIKE-295:
--------------------------------------------

> "The bean has a bean type that matches the required type."

The spec says that and then explains further what it means. For raw and parameterized types (our case) it means that either the two types are identical (not true in our case) or the bean type is assignable to the required type as defined in 5.2.3. 5.2.3 does not say that JmsMessage (a raw type) is assignable to JmsMessage<UserMessage> (parameterized type) so this part is also false in our case.

> 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.

Which use cases would require InjectionPoint<T>?

                
> 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

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

Posted by "Martin Kouba (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507266#comment-13507266 ] 

Martin Kouba commented on DELTASPIKE-295:
-----------------------------------------

Mark this might also be interpreted the other way around: it's not identical and it's not assignable as defined in 5.2.3(4). I suggest to file a CDI clarification issue. BTW I don't see any statement like "if not defined, standard Java rules apply" there.

                
> 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

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

Posted by "Gerhard Petracek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507062#comment-13507062 ] 

Gerhard Petracek commented on DELTASPIKE-295:
---------------------------------------------

currently there is just a tag of Weld 2.0.0.Beta1 (2.0.0.Beta1-staging)
it isn't an issue with 2.0.0-SNAPSHOT (see https://builds.apache.org/view/A-F/view/DeltaSpike/job/DeltaSpike%20Weld%202.0.0-SNAPSHOT/ )
                
> 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