harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6000) [classlib] [luni] java.lang.reflect.Proxy.getProxyClass(...) fails to create new proxy instance in default package
Date Tue, 21 Oct 2008 05:12:44 GMT
[classlib] [luni] java.lang.reflect.Proxy.getProxyClass(...) fails to create new proxy instance
in default package
------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-6000
                 URL: https://issues.apache.org/jira/browse/HARMONY-6000
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M7
            Reporter: Kevin Zhou
             Fix For: 5.0M8, 5.0M7


Given a test case [1] and two interfaces [2] [3] in default package.
(1) Run test case [1] on [2], both of HY5's and RI's Proxy work well.
(2) Run test case [1] on [3], HY5' Proxy fails [4] while RI works well.
In conclusion, this is only a problem when the interfaces are undeclared "public" and located
in the default package.
Note: The reported defect only happened when the interface is undeclared "public" and located
in default package. Thus please put this test case in the default package.

Would you please help to review this patch?

[1]. testcase
public class ProxyTest extends TestCase {
public void test_getProxyClass_DefaultPackage() {
Class pc = Proxy.getProxyClass(DefaultPkgIntf.class.getClassLoader(),
new Class[] { DefaultPkgIntf.class });
}
}

[2]. declared "public" DefaultPkgIntf in default package
public interface DefaultPkgIntf {
}

[3] undeclared "public" DefaultPkgIntf in default package
interface DefaultPkgIntf {
}

[4]
java.lang.ClassFormatError: JVMCFRE068 invalid class class=/$Proxy0?offset=0
at java.lang.reflect.Proxy.defineClassImpl(Native Method)
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:154)
at ProxyTest.test_getProxyClass_DefaultPackage(Proxy2Test.java:9)
at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:197)
at java.lang.reflect.Method.invoke(Method.java:238)] 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message