harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-6077) [eut][drlvm] Class.getMethod may return method of subtype
Date Wed, 25 Mar 2009 07:58:50 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey Varlamov resolved HARMONY-6077.
--------------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 5.0M9)

Thanks for the link Li, it also provided relevant bugreport for RI [1]. Quite funny approach
to fix reflection issues via javac compiler workarounds :)

Chunrong, why would you ever want to differentiate member accessibility rules between normal
use and reflection? Anyway the API specs for reflection always refer to Java language access
control. Thus resolving WONTFIX.

[1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6342411

> [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
>
> 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.


Mime
View raw message