< prev index next >
test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestHost.java
Print this page
*** 23,36 ****
package P1;
/*
* This is used to produce a jcod file in which we modify the
! * NestMembers attribute to claim that P2.PackagedNestTop.Member
* is a member of our nest.
*/
! public class PackagedNestTop {
// Use this to get our own NestMembers attribute
public static class Member {
private static void m() {
System.out.println("You should never see this!");
}
--- 23,36 ----
package P1;
/*
* This is used to produce a jcod file in which we modify the
! * NestMembers attribute to claim that P2.PackagedNestHost.Member
* is a member of our nest.
*/
! public class PackagedNestHost {
// Use this to get our own NestMembers attribute
public static class Member {
private static void m() {
System.out.println("You should never see this!");
}
*** 39,46 ****
// Entry point for main test
public static void doAccess() {
// this should fail at runtime as m() will now be private
// and the nestmate access check should fail due to m() being in
// a different package.
! P2.PackagedNestTop2.Member.m();
}
}
\ No newline at end of file
--- 39,46 ----
// Entry point for main test
public static void doAccess() {
// this should fail at runtime as m() will now be private
// and the nestmate access check should fail due to m() being in
// a different package.
! P2.PackagedNestHost2.Member.m();
}
}
\ No newline at end of file
< prev index next >