hg: jdk9/hs/jdk: 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

harold.seigel at oracle.com harold.seigel at oracle.com
Wed Sep 7 13:20:51 UTC 2016


Changeset: e54f4b7cd337
Author:    hseigel
Date:      2016-09-07 07:21 -0400
URL:       http://hg.openjdk.java.net/jdk9/hs/jdk/rev/e54f4b7cd337

8058575: IllegalAccessError trying to access package-private class from VM anonymous class
Summary: Put anonymous classes in unnamed package into host class's package.  Throw exception if host class's package differs from anonymous class.
Reviewed-by: coleenp, acorn

! src/java.base/share/classes/jdk/internal/misc/Unsafe.java
! test/java/lang/Class/GetModuleTest.java
! test/java/lang/invoke/VMAnonymousClass.java
+ test/jdk/internal/misc/Unsafe/TestBadHostClass.java



More information about the jdk9-all-changes mailing list