Mantis - Resin
Viewing Issue Advanced Details
5522 crash always 09-08-13 06:25 09-23-13 11:33
arjan_tijms  
ferg  
normal  
closed 4.0.36  
fixed  
none    
none 4.0.38  
0005522: Generic producer method doesn't work with CanDI/Resin
When using a generic producer method with e.g. the following signature:

    @Produces
    @Param
    public <V> ParamValue<V> produce(InjectionPoint injectionPoint)

Resin throws an exception with the following text:

 {resin-port-8080-43} classpath:META-INF/caucho/app-default.xml:55: javax.enterprise.inject.InjectionException: 'public org.omnifaces.cdi.param.ParamValue org.omnifaces.cdi.param.RequestParameterProducer.produce(javax.enterprise.inject.spi.InjectionPoint)' is an invalid @Produces method because it returns a generic type class org.omnifaces.cdi.param.ParamValue<produce_T_0>
                       
                       53: default="true"/>
                       54:
                       55: <resin:if test="${! quercus_disable}">
                       56: <servlet-mapping url-pattern="*.php"
                       57: servlet-name="resin-php"

Although the CDI 1.0 spec doesn't require this to work, it's not forbidden either. Weld 1.x/2.x and OpenWebBeans 1.1.x/1.2.x do support this. A snapshot of OpenWebBeans 1.2.1 didn't support this anymore (following CDI 1.1 discussions), but after some further discussion decided that it should indeed be supported.

See also https://issues.apache.org/jira/browse/OWB-893 [^]

Notes
(0006325)
ferg   
09-23-13 11:33   
ioc/07h1

Note: this validation was required by the CDI TCK. It's not actually question of supporting; it's just removing a validation check that was required by TCK.