-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.3.1
-
None
-
x86
-
linux
http://openide.netbeans.org/issues/show_bug.cgi?id=11679
A public method is defined in package private class. The package private class is then extended by a public class ni the same package. So:
Method theMethod = publicIntance.getClass().getMethod("theMethod");
returns proper method (quering it for accessibility returns true). And it is possible to call the method without reflection:
publicInstance.theMethod();
but reflection invocation
theMethod.invoke(publicInstance, new Object[0])
throws the exception.
A public method is defined in package private class. The package private class is then extended by a public class ni the same package. So:
Method theMethod = publicIntance.getClass().getMethod("theMethod");
returns proper method (quering it for accessibility returns true). And it is possible to call the method without reflection:
publicInstance.theMethod();
but reflection invocation
theMethod.invoke(publicInstance, new Object[0])
throws the exception.
- duplicates
-
JDK-4071957 (reflect) Method.invoke access control does not understand inner class scoping
-
- Closed
-