You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Leo Li (JIRA)" <ji...@apache.org> on 2006/11/29 05:35:21 UTC
[jira] Created: (HARMONY-2355)
[classlib[luni]java.lang.reflect.Proxy.newProxyInstance throws
IllegalArgumentException with two interfaces one method of which have the
same signature except compatible return types.
[classlib[luni]java.lang.reflect.Proxy.newProxyInstance throws IllegalArgumentException with two interfaces one method of which have the same signature except compatible return types.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: HARMONY-2355
URL: http://issues.apache.org/jira/browse/HARMONY-2355
Project: Harmony
Issue Type: Bug
Reporter: Leo Li
Here is the testcase:
public void testNewProxyInstanceWithCompatibleReturnTypes() {
Object o = Proxy
.newProxyInstance(this.getClass().getClassLoader(),
new Class[] { ITestReturnObject.class,
ITestReturnString.class },
new TestProxyHandler(new TestProxyImpl()));
assertNotNull(o);
}
public static interface ITestReturnObject {
Object f();
}
public static interface ITestReturnString {
String f();
}
public static class TestProxyImpl implements ITestReturnObject,
ITestReturnString {
public String f() {
// do nothing
return null;
}
}
public static class TestProxyHandler implements InvocationHandler {
private Object proxied;
public TestProxyHandler(Object object) {
proxied = object;
}
public Object invoke(Object object, Method method, Object[] args)
throws Throwable {
// do nothing
return method.invoke(proxied, args);
}
}
RI passes.
Harmony fails.
--
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
[jira] Assigned: (HARMONY-2355)
[classlib[luni]java.lang.reflect.Proxy.newProxyInstance throws
IllegalArgumentException with two interfaces one method of which have the
same signature except compatible return types.
Posted by "Richard Liang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2355?page=all ]
Richard Liang reassigned HARMONY-2355:
--------------------------------------
Assignee: Richard Liang
> [classlib[luni]java.lang.reflect.Proxy.newProxyInstance throws IllegalArgumentException with two interfaces one method of which have the same signature except compatible return types.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2355
> URL: http://issues.apache.org/jira/browse/HARMONY-2355
> Project: Harmony
> Issue Type: Bug
> Reporter: Leo Li
> Assigned To: Richard Liang
> Attachments: patch-2355.diff
>
>
> Here is the testcase:
> public void testNewProxyInstanceWithCompatibleReturnTypes() {
> Object o = Proxy
> .newProxyInstance(this.getClass().getClassLoader(),
> new Class[] { ITestReturnObject.class,
> ITestReturnString.class },
> new TestProxyHandler(new TestProxyImpl()));
> assertNotNull(o);
> }
> public static interface ITestReturnObject {
> Object f();
> }
> public static interface ITestReturnString {
> String f();
> }
> public static class TestProxyImpl implements ITestReturnObject,
> ITestReturnString {
> public String f() {
> // do nothing
> return null;
> }
> }
> public static class TestProxyHandler implements InvocationHandler {
> private Object proxied;
> public TestProxyHandler(Object object) {
> proxied = object;
> }
> public Object invoke(Object object, Method method, Object[] args)
> throws Throwable {
> // do nothing
> return method.invoke(proxied, args);
> }
> }
> RI passes.
> Harmony fails.
--
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
[jira] Updated: (HARMONY-2355)
[classlib[luni]java.lang.reflect.Proxy.newProxyInstance throws
IllegalArgumentException with two interfaces one method of which have the
same signature except compatible return types.
Posted by "Leo Li (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2355?page=all ]
Leo Li updated HARMONY-2355:
----------------------------
Attachment: patch-2355.diff
Will somebody try the patch?
> [classlib[luni]java.lang.reflect.Proxy.newProxyInstance throws IllegalArgumentException with two interfaces one method of which have the same signature except compatible return types.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2355
> URL: http://issues.apache.org/jira/browse/HARMONY-2355
> Project: Harmony
> Issue Type: Bug
> Reporter: Leo Li
> Attachments: patch-2355.diff
>
>
> Here is the testcase:
> public void testNewProxyInstanceWithCompatibleReturnTypes() {
> Object o = Proxy
> .newProxyInstance(this.getClass().getClassLoader(),
> new Class[] { ITestReturnObject.class,
> ITestReturnString.class },
> new TestProxyHandler(new TestProxyImpl()));
> assertNotNull(o);
> }
> public static interface ITestReturnObject {
> Object f();
> }
> public static interface ITestReturnString {
> String f();
> }
> public static class TestProxyImpl implements ITestReturnObject,
> ITestReturnString {
> public String f() {
> // do nothing
> return null;
> }
> }
> public static class TestProxyHandler implements InvocationHandler {
> private Object proxied;
> public TestProxyHandler(Object object) {
> proxied = object;
> }
> public Object invoke(Object object, Method method, Object[] args)
> throws Throwable {
> // do nothing
> return method.invoke(proxied, args);
> }
> }
> RI passes.
> Harmony fails.
--
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
[jira] Resolved: (HARMONY-2355)
[classlib[luni]java.lang.reflect.Proxy.newProxyInstance throws
IllegalArgumentException with two interfaces one method of which have the
same signature except compatible return types.
Posted by "Richard Liang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2355?page=all ]
Richard Liang resolved HARMONY-2355.
------------------------------------
Resolution: Fixed
Hello Leo
The patch has been applied at revision r480858 with minor modifications (replace your private method isSuperClass with Class.isAssignableFrom), thanks a lot for this enhancement, please verify that the problem is fully fixed as you expected.
Best regards,
Richard.
> [classlib[luni]java.lang.reflect.Proxy.newProxyInstance throws IllegalArgumentException with two interfaces one method of which have the same signature except compatible return types.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2355
> URL: http://issues.apache.org/jira/browse/HARMONY-2355
> Project: Harmony
> Issue Type: Bug
> Reporter: Leo Li
> Attachments: patch-2355.diff
>
>
> Here is the testcase:
> public void testNewProxyInstanceWithCompatibleReturnTypes() {
> Object o = Proxy
> .newProxyInstance(this.getClass().getClassLoader(),
> new Class[] { ITestReturnObject.class,
> ITestReturnString.class },
> new TestProxyHandler(new TestProxyImpl()));
> assertNotNull(o);
> }
> public static interface ITestReturnObject {
> Object f();
> }
> public static interface ITestReturnString {
> String f();
> }
> public static class TestProxyImpl implements ITestReturnObject,
> ITestReturnString {
> public String f() {
> // do nothing
> return null;
> }
> }
> public static class TestProxyHandler implements InvocationHandler {
> private Object proxied;
> public TestProxyHandler(Object object) {
> proxied = object;
> }
> public Object invoke(Object object, Method method, Object[] args)
> throws Throwable {
> // do nothing
> return method.invoke(proxied, args);
> }
> }
> RI passes.
> Harmony fails.
--
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
[jira] Commented: (HARMONY-2355)
[classlib[luni]java.lang.reflect.Proxy.newProxyInstance throws
IllegalArgumentException with two interfaces one method of which have the
same signature except compatible return types.
Posted by "Leo Li (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2355?page=comments#action_12454552 ]
Leo Li commented on HARMONY-2355:
---------------------------------
Verified. Thank you.
> [classlib[luni]java.lang.reflect.Proxy.newProxyInstance throws IllegalArgumentException with two interfaces one method of which have the same signature except compatible return types.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2355
> URL: http://issues.apache.org/jira/browse/HARMONY-2355
> Project: Harmony
> Issue Type: Bug
> Reporter: Leo Li
> Assigned To: Richard Liang
> Attachments: patch-2355.diff
>
>
> Here is the testcase:
> public void testNewProxyInstanceWithCompatibleReturnTypes() {
> Object o = Proxy
> .newProxyInstance(this.getClass().getClassLoader(),
> new Class[] { ITestReturnObject.class,
> ITestReturnString.class },
> new TestProxyHandler(new TestProxyImpl()));
> assertNotNull(o);
> }
> public static interface ITestReturnObject {
> Object f();
> }
> public static interface ITestReturnString {
> String f();
> }
> public static class TestProxyImpl implements ITestReturnObject,
> ITestReturnString {
> public String f() {
> // do nothing
> return null;
> }
> }
> public static class TestProxyHandler implements InvocationHandler {
> private Object proxied;
> public TestProxyHandler(Object object) {
> proxied = object;
> }
> public Object invoke(Object object, Method method, Object[] args)
> throws Throwable {
> // do nothing
> return method.invoke(proxied, args);
> }
> }
> RI passes.
> Harmony fails.
--
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
[jira] Closed: (HARMONY-2355)
[classlib[luni]java.lang.reflect.Proxy.newProxyInstance throws
IllegalArgumentException with two interfaces one method of which have the
same signature except compatible return types.
Posted by "Richard Liang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2355?page=all ]
Richard Liang closed HARMONY-2355.
----------------------------------
Verified by Leo
> [classlib[luni]java.lang.reflect.Proxy.newProxyInstance throws IllegalArgumentException with two interfaces one method of which have the same signature except compatible return types.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2355
> URL: http://issues.apache.org/jira/browse/HARMONY-2355
> Project: Harmony
> Issue Type: Bug
> Reporter: Leo Li
> Assigned To: Richard Liang
> Attachments: patch-2355.diff
>
>
> Here is the testcase:
> public void testNewProxyInstanceWithCompatibleReturnTypes() {
> Object o = Proxy
> .newProxyInstance(this.getClass().getClassLoader(),
> new Class[] { ITestReturnObject.class,
> ITestReturnString.class },
> new TestProxyHandler(new TestProxyImpl()));
> assertNotNull(o);
> }
> public static interface ITestReturnObject {
> Object f();
> }
> public static interface ITestReturnString {
> String f();
> }
> public static class TestProxyImpl implements ITestReturnObject,
> ITestReturnString {
> public String f() {
> // do nothing
> return null;
> }
> }
> public static class TestProxyHandler implements InvocationHandler {
> private Object proxied;
> public TestProxyHandler(Object object) {
> proxied = object;
> }
> public Object invoke(Object object, Method method, Object[] args)
> throws Throwable {
> // do nothing
> return method.invoke(proxied, args);
> }
> }
> RI passes.
> Harmony fails.
--
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