[jboss-jira] [JBoss JIRA] Created: (JBBUILD-329) replacement of java.util. classes create invalid classes

St?le Pedersen (JIRA) jira-events at jboss.com
Wed Nov 15 18:17:42 EST 2006


replacement of java.util. classes create invalid classes
--------------------------------------------------------

                 Key: JBBUILD-329
                 URL: http://jira.jboss.com/jira/browse/JBBUILD-329
             Project: JBoss Build System
          Issue Type: Bug
          Components: JBossRetro
    Affects Versions:  JBossRetro-1.0.4.GA
         Environment: GNU/Linux, 2.6.15. Jdk5.0, Jdk1.4
            Reporter: St?le Pedersen


This problem was discovered when a test in jbossaop failed when using retro to run the tests in jdk1.4.
The case:
public class SuperPOJO<T extends java.util.AbstractList>
{
   private T fooObject;
   public void setFoo(T arg) { fooObject = arg;}
   public T getFoo() {return fooObject;}
}

public class SubPOJO extends SuperPOJO<java.util.ArrayList>
{
   private java.util.ArrayList bar;
   public void setFoo(java.util.ArrayList a) { bar = a;}
   public java.util.ArrayList getFoo(){ return bar;}
}
you can find the test under bridgemethods in jbossaop.

SubPOJO will after compilation have a method like:
public volatile AbstractList getFoo() { return getFoo() };
- note that volatile is what the decompiler names it. more specifically
its a bridge method created by the compiler.
SubPOJO will have the method:
public ArrayList getFoo() { return bar; }

after jbossretro have changed java.util.AbstractList to
edu.emory...AbstractList, the class will fail when its called.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list