Mantis - Resin
Viewing Issue Advanced Details
4514 minor always 04-19-11 14:01 04-26-11 11:05
rickHigh  
ferg  
normal  
closed  
fixed  
none    
none 4.0.18  
0004514: Resin proxy generations breaks for generics

@Local
public interface SchoolDao {
        ...

    public <T extends BaseEntity> void refresh(T entity);

________

@Stateless
public class SchoolJpaDao implements SchoolDao {
      ...

    @Override
    public <T extends BaseEntity> void refresh(T entity) {
        if (entityManager.contains(entity)) {
            entityManager.refresh(entity);
        }
    }

This causes Resin proxy generation to fail as follows:


     [java] [11-04-19 13:46:47.240] {main} Compiling org/cdisource/examples/taskcrud/bean/SchoolJpaDao__StatelessProxy.java
     [java] [11-04-19 13:46:47.836] {main} WebApp[production/webapp/default/taskcrud] fail
     [java] [11-04-19 13:46:47.836] {main} /Users/rick/tools/resin/resin-4.0.17/webapps/taskcrud/WEB-INF/work/ejb/org/cdisource/examples/taskcrud/bean/SchoolJpaDao__StatelessProxy.java:114: cannot find symbol
     [java] symbol : class T_0
     [java] location: class org.cdisource.examples.taskcrud.bean.SchoolJpaDao__StatelessProxy<T>
     [java] public void refresh(T_0 a0)
     [java] ^
     [java] Note: /Users/rick/tools/resin/resin-4.0.17/webapps/taskcrud/WEB-INF/work/ejb/org/cdisource/examples/taskcrud/bean/SchoolJpaDao__StatelessProxy.java uses unchecked or unsafe operations.
     [java] Note: Recompile with -Xlint:unchecked for details.
     [java] 1 error
     [java] [11-04-19 13:46:47.837] {main} Host[production/host/default] active
To reproduce:

http://code.google.com/p/jee6-cdi/wiki/UsingKnappSackArchetypeWithResin [^]

Comment out @Stateless DataRepositoryProducer.

//@Stateless
public class DataRepositoryProducer {

Notes
(0005201)
ferg   
04-26-11 11:05   
ejb/40c6