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

Paul Gier (JIRA) jira-events at lists.jboss.org
Tue Jun 5 17:47:08 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBBUILD-329?page=all ]

Paul Gier closed JBBUILD-329.
-----------------------------

    Resolution: Done

The problem actually had to do with retroing the collection classes in general.  The problem is that when a class like AbstractList gets translated to the backport concurrent version it breaks the inheritance hierarchy because java.util.ArrayList is not a subclass of the backport concurrent version of AbstractList.

The issue was fixed by simply not translating certain Abstract collection classes from java.util.  AbstractQueue needs to be translated, but the others do not.

> 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
>         Assigned To: Paul Gier
>             Fix For: JBossRetro-1.1.0.GA
>
>
> 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