From commits-return-57389-apmail-harmony-commits-archive=harmony.apache.org@harmony.apache.org Mon Mar 02 16:39:17 2009 Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 44402 invoked from network); 2 Mar 2009 16:39:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Mar 2009 16:39:17 -0000 Received: (qmail 82774 invoked by uid 500); 2 Mar 2009 16:39:17 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 82681 invoked by uid 500); 2 Mar 2009 16:39:17 -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 82672 invoked by uid 99); 2 Mar 2009 16:39:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2009 08:39:17 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2009 16:39:16 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5306B234C4A8 for ; Mon, 2 Mar 2009 08:38:56 -0800 (PST) Message-ID: <1868692945.1236011936338.JavaMail.jira@brutus> Date: Mon, 2 Mar 2009 08:38:56 -0800 (PST) From: "Alexey Varlamov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6077) [eut][drlvm] Class.getMethod may return method of subtype In-Reply-To: <1096447609.1232611919759.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 [ https://issues.apache.org/jira/browse/HARMONY-6077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678032#action_12678032 ] Alexey Varlamov commented on HARMONY-6077: ------------------------------------------ No, such a fix is incorrect. Apparently we face a bug in RI. Java Language Specification explicitly mentions similar scenario (section 8.2.1 of JLS 2nd edition). My vote is to resolve this as non-bug difference (file a bug against EUT if needed to improve pass rate). > [eut][drlvm] Class.getMethod may return method of subtype > ---------------------------------------------------------- > > Key: HARMONY-6077 > URL: https://issues.apache.org/jira/browse/HARMONY-6077 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Affects Versions: 5.0M8 > Reporter: Regis Xu > Fix For: 5.0M9 > > > test case: > X.java: > import java.lang.reflect.*; > import p.*; > public class X { > static public void main(String args[]) { > Y y = new Y(); > try { > Method foo = Y.class.getMethod("foo", (Class[]) null); > y.foo(); > foo.invoke(y, (Object[]) null); > } catch (NoSuchMethodException e) { > // ignore > } catch (InvocationTargetException e) { > // ignore > } catch (IllegalAccessException e) { > System.out.print("FAILURE: IllegalAccessException"); > } > } > } > Y.java > package p; > public class Y extends Z { > /* empty */ > } > Z.java > package p; > class Z { > public void foo() { > System.out.println("SUCCESS"); //$NON-NLS-1$ > } > } > run class X, RI and classlib with IBM VME has the same output: > SUCCESS > FAILURE: IllegalAccessException > while drlvm output: > SUCCESS > SUCCESS > after debugging, I found foo is public void p.Z.foo() -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.