[ https://issues.apache.org/jira/browse/HARMONY-6077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678206#action_12678206 ] Chunrong Lai commented on HARMONY-6077: --------------------------------------- hi, Alexey: Please correct me if I am wrong. The test case in HARMONY-6077 give two ways to run the methos, y.foo(); and foo.invoke(y, (Object[]) null); We see that Harmony(drlvm) and RI both succeed in the first case (y.foo();) as the section 8.2.1.4 "Accessing Members of Inaccessible Classes" of JLS mentions. The problem and my suggested fix happens/targets in foo.invoke(y, (Object[]) null); I am not sure if the case is same as what mentions in section 8.2.1 of JLS. > [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.