Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 97527 invoked from network); 1 Dec 2006 07:55:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Dec 2006 07:55:46 -0000 Received: (qmail 32994 invoked by uid 500); 1 Dec 2006 07:55:55 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 32967 invoked by uid 500); 1 Dec 2006 07:55:55 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 32957 invoked by uid 99); 1 Dec 2006 07:55:54 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Nov 2006 23:55:54 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Nov 2006 23:55:45 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 68E147142EC for ; Thu, 30 Nov 2006 23:55:25 -0800 (PST) Message-ID: <21140291.1164959725427.JavaMail.jira@brutus> Date: Thu, 30 Nov 2006 23:55:25 -0800 (PST) From: "Richard Liang (JIRA)" To: commits@harmony.apache.org Subject: [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. In-Reply-To: <4328155.1164774921598.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on 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