You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Richard Liang (JIRA)" <ji...@apache.org> on 2006/12/01 08:55:25 UTC
[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.
[ 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