You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2008/10/21 07:12:44 UTC

[jira] Created: (HARMONY-6000) [classlib] [luni] java.lang.reflect.Proxy.getProxyClass(...) fails to create new proxy instance in default package

[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.


[jira] Updated: (HARMONY-6000) [classlib] [luni] java.lang.reflect.Proxy.getProxyClass(...) fails to create new proxy instance in default package

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Zhou updated HARMONY-6000:
--------------------------------

    Attachment: HARMONY-6000.diff

Would you please help to try it?

> [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.0M7, 5.0M8
>
>         Attachments: HARMONY-6000.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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.


[jira] Closed: (HARMONY-6000) [classlib] [luni] java.lang.reflect.Proxy.getProxyClass(...) fails to create new proxy instance in default package

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Zhou closed HARMONY-6000.
-------------------------------


> [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
>            Assignee: Tim Ellison
>             Fix For: 5.0M7, 5.0M8
>
>         Attachments: HARMONY-6000.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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.


[jira] Resolved: (HARMONY-6000) [classlib] [luni] java.lang.reflect.Proxy.getProxyClass(...) fails to create new proxy instance in default package

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison resolved HARMONY-6000.
----------------------------------

    Resolution: Fixed

Thanks Kevin.

Patch applied to LUNI module at repo revision r707187.

Please check it was added as you expected.


> [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
>            Assignee: Tim Ellison
>             Fix For: 5.0M8, 5.0M7
>
>         Attachments: HARMONY-6000.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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.


[jira] Assigned: (HARMONY-6000) [classlib] [luni] java.lang.reflect.Proxy.getProxyClass(...) fails to create new proxy instance in default package

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison reassigned HARMONY-6000:
------------------------------------

    Assignee: Tim Ellison

> [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
>            Assignee: Tim Ellison
>             Fix For: 5.0M7, 5.0M8
>
>         Attachments: HARMONY-6000.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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.