harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-428) [classlib] java.lang.reflect.Proxy.newProxyInstance(ClassLoader,Class[], InvocationHandler) throws unspesified java.lang.ClassFormatError
Date Mon, 07 Aug 2006 10:48:14 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-428?page=comments#action_12426190 ] 
            
Alexey Petrenko commented on HARMONY-428:
-----------------------------------------

I can not reproduce this bug on classlib+drlvm+Windows. Svetlana, check it please.
Probably we should close it as not reproducible.

BTW, I've modified a testcase to run it without junit:
import java.beans.EventHandler; 
import java.util.EventObject; 
import java.util.EventListener;
import java.lang.reflect.Proxy;

public class Jira428Test { 
    public static void main(String argv[]) {
        Proxy.newProxyInstance(new Target().getClass().getClassLoader(), new Class[] { FredListener.class
},
               new EventHandler(new Target(), "meth1", null, null));
   
    }    
}

interface FredListener extends EventListener { 
    public void fireFredEvent(FredEvent event); 
} 


class Target { 
    public void meth1() {} 
    public void meth2(int i) {}

} 

class FredEvent extends EventObject { 
    static int i = 0; 
    public FredEvent(Object arg) { 
        super(arg); 
    } 
    public static int getI() { 
        return i; 
    } 
    public static void setI(int j) { 
        i = j; 
    } 
} 



> [classlib] java.lang.reflect.Proxy.newProxyInstance(ClassLoader,Class[], InvocationHandler)
throws unspesified java.lang.ClassFormatError
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-428
>                 URL: http://issues.apache.org/jira/browse/HARMONY-428
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Svetlana Samoilenko
>            Priority: Minor
>         Attachments: ProxyTest.java
>
>
> The test shows that Proxy.newProxyInstance(ClassLoader loader,Class[] interfaces, InvocationHandler
h) throws unspesified java.lang.ClassFormatError while on BEA 1.5 it passes. Error is in the
native method defineClassImpl.
>  
> Output on BEA 1.5:
> .
> Time: 0,109
> OK (1 test)
>  
> Output on Harmony:
> .E
> There was 1 error:
> 1) test_newProxyInstance_ClassLoader_Class_InvocationHandler(ProxyTest)java.lang.ClassFormatError:
(/$Proxy0) class name is invalid at offset=0
>         at java.lang.reflect.Proxy.defineClassImpl(Native Method)
>         at java.lang.reflect.Proxy.getProxyClass(Proxy.java:112)
>         at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:150)
>         at ProxyTest.test_newProxyInstance_ClassLoader_Class_InvocationHandler(ProxyTest.java:9)
>         at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
> FAILURES!!!
> Tests run: 1,  Failures: 0,  Errors: 1 

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

        

Mime
View raw message