Mantis - Resin
Viewing Issue Advanced Details
4590 minor always 06-02-11 11:57 06-02-11 18:38
reza  
ferg  
normal  
closed 4.0.19  
fixed  
none    
none 4.0.19  
0004590: EJB Code Generation Error with Generics
The following EJB causes a code generation error:

================================================================================
@Stateless
public class FooService {
  public <T extends Serializable> List<T> find(Class<T> tcmClass,
      Collection<Integer> ids) {
    return Collections.emptyList();
  }

  public <T> List<T> findAll(Class<T> tcmClass) {
    return Collections.emptyList();
  }
}
================================================================================

The error is below:
================================================================================
11-06-02 14:49:18.813] {http://*:8080-2} [^] /home/reza/workspace/resin/webapps/ejb-generics/WEB-INF/work/ejb/qa/FooService__StatelessProxy.java:13: name clash: <T_0>findAll(java.lang.Class<T_0>) in qa.FooService__StatelessProxy<T> and <T>findAll(java.lang.Class<T>) in qa.FooService have the same erasure, yet neither overrides the other
                                          public class FooService__StatelessProxy<T>
================================================================================

This issue was originally reported by Harald Wellmann: http://forum.caucho.com/showthread.php?t=27905. [^]

Notes
(0005291)
ferg   
06-02-11 18:38   
ejb/50b1