--- old/src/share/vm/prims/unsafe.cpp 2016-08-03 07:55:16.526355484 -0400 +++ new/src/share/vm/prims/unsafe.cpp 2016-08-03 07:55:15.279990205 -0400 @@ -787,8 +787,12 @@ // link to any member of U. Just after U is loaded, the only way to use it is reflectively, // through java.lang.Class methods like Class.newInstance. +// The package of an anonymous class must either match its host's class's package or be in the +// unnamed package. If it is in the unnamed package then it will be put in its host class's +// package. +// + // Access checks for linkage sites within U continue to follow the same rules as for named classes. -// The package of an anonymous class is given by the package qualifier on the name under which it was loaded. // An anonymous class also has special privileges to access any member of its host class. // This is the main reason why this loading operation is unsafe. The purpose of this is to // allow language implementations to simulate "open classes"; a host class in effect gets