Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 67959 invoked from network); 4 Sep 2009 09:07:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Sep 2009 09:07:54 -0000 Received: (qmail 31129 invoked by uid 500); 4 Sep 2009 09:07:54 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 31057 invoked by uid 500); 4 Sep 2009 09:07:53 -0000 Mailing-List: contact dev-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 dev@harmony.apache.org Received: (qmail 31046 invoked by uid 99); 4 Sep 2009 09:07:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Sep 2009 09:07:53 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of t.p.ellison@gmail.com designates 209.85.220.224 as permitted sender) Received: from [209.85.220.224] (HELO mail-fx0-f224.google.com) (209.85.220.224) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Sep 2009 09:07:43 +0000 Received: by fxm24 with SMTP id 24so510826fxm.36 for ; Fri, 04 Sep 2009 02:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=ovIDPLA7yIVbeB2Hp1VBiJi1jHvtR5ossK4hC0Dt3MU=; b=cAYsxWoEgJj4yhvZd64rmBq11S+uG1rT9N3y6ufpOcsmhnfdNyC01mIKDC69iVGBQ3 q3Z+ATSkODTX69rTxtU7TSBKVI3X/sWt5OWXpPP/owBzbHbiezGgshEjnEnmsoDz+d0J rN35ApGv2t7LA5mWhP8TwI0IHqrIUXDfw/gkY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=FIp1YfRhW1mlrolRqr8crKWDCoaga9Yid8hXgOQKOa4CJm69Iqx6rKJB1mh0ip2W5l fSP9GT+632NoLKeL7YydCPph22KNAM/scOUyxJPrbJ1QBBdJaKZGSvBu9rWL3Ufy25BX ZuB1syrZ+6fHB/JQQ76eM6JkGjhTF8DjSJCdc= Received: by 10.204.154.147 with SMTP id o19mr8864600bkw.159.1252055242441; Fri, 04 Sep 2009 02:07:22 -0700 (PDT) Received: from ?9.20.183.159? (blueice2n1.uk.ibm.com [195.212.29.75]) by mx.google.com with ESMTPS id c28sm1307039fka.19.2009.09.04.02.07.21 (version=SSLv3 cipher=RC4-MD5); Fri, 04 Sep 2009 02:07:21 -0700 (PDT) Message-ID: <4AA0D8C4.6050101@gmail.com> Date: Fri, 04 Sep 2009 10:07:16 +0100 From: Tim Ellison User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: dev@harmony.apache.org Subject: Re: [jira] Commented: (HARMONY-6331) [classlib][beans] remove XMLDecoderTest from the exclude list References: <1121321485.1251961652868.JavaMail.jira@brutus> <1013827094.1251972935467.JavaMail.jira@brutus> <5948b71e0909040026g6454c10csc2cf9515a0ad854f@mail.gmail.com> In-Reply-To: <5948b71e0909040026g6454c10csc2cf9515a0ad854f@mail.gmail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 04/Sep/2009 08:26, Charles Lee wrote: > Thanks Regis. > > The testcase will *pass* on ri and harmony+vme. But failed on harmony+drlvm. > The reason cause this difference is due to differenct order returned by the > Class.getMethods. > It seems findMethod in XMLDecoder shoud fix this problem, because it should > be order free. > > Also I use "*" around the word "pass" when I mentioned result using harmony > + vme. It is a fake pass. The exception it throw is "Cannot decide which > method to call to match get" due to the specific method order it get. The > senario as follows: > > Class A has four method: > 1. test(int, String) > 2. test(Integer, Object) > 3. test(Object, String) > 4. test(String, Object) > > I want to invoke the test with arg null and "aaa", that is > method.invoke(null, "aaa"). Which method should be invoked? > RI: NoSuchMethodException > vme: (mothed order is 4, 1, 2, 3), "Cannot decide which method to call to > match get", because method 4 and method 2 has the same distance. > drlvm: (mothd order is 1, 2, 3, 4), method 3 is invoked because it has the > smallest distance. > > My question is: which method should be invoked? Is this a quiz, or are you asking for an opinion? I would hope that the correct answer could be determined from the Beans spec, otherwise we should follow the RI's behavior. I would guess 3, since null is a valid actual parameter for an Object formal parameter (and an int is not) and String matches exactly. I don't think the order should matter. However, I'm not so familiar with the spec to say whether my 'logical answer' is the one the spec would give you. Regards, Tim