[8] RFR (XS): 8032585: JSR292: IllegalAccessError when attempting to invoke protected method from different package

Christian Thalinger christian.thalinger at oracle.com
Mon Jan 27 18:54:25 UTC 2014

Looks good.

On Jan 27, 2014, at 8:05 AM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:

> http://cr.openjdk.java.net/~vlivanov/8032585/webrev.00/
> https://bugs.openjdk.java.net/browse/JDK-8032585
> JSR292 access verification logic refuses method handle lookup access to 
> methods which are defined on inaccessible classes. This is usually 
> correct, but in the corner case of inheritance through a public class, 
> it is wrong. 8029507 makes the JVM provide more correct information 
> about the defining class of a looked-up method and this corrected 
> information is causing the old and wrong checks to fail where they 
> didn't fail before.
> The fix is to relax the check: don't require the class where protected 
> member is declared to be public. It is enough to check that defining 
> class is a super class of the class lookup request comes from to ensure 
> there are enough privileges to access protected member.
> Testing: regression test, enumeration tests on access checks, 
> jdk/test/java/lang/invoke, vm.mlvm.testlist
> Thanks!
> Best regards,
> Vladimir Ivanov
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

More information about the core-libs-dev mailing list