< prev index next >
test/hotspot/jtreg/runtime/Nestmates/classFileParsing/TestNestmateAttributes.java
Print this page
*** 23,65 ****
/*
* @test
* @bug 8046171
* @summary Test incorrect use of Nestmate related attributes
! * @compile TwoMemberOfNest.jcod
* TwoNestMembers.jcod
! * ConflictingAttributesInNestTop.jcod
* ConflictingAttributesInNestMember.jcod
* BadNestMembersLength.jcod
* BadNestMembersEntry.jcod
* DuplicateNestMemberEntry.jcod
! * BadNestTop.jcod
* @run main TestNestmateAttributes
*/
public class TestNestmateAttributes {
public static void main(String args[]) throws Throwable {
String[] badClasses = new String[] {
! "NestmateAttributeHolder$TwoMemberOfNest",
"NestmateAttributeHolder",
! "ConflictingAttributesInNestTop",
"NestmateAttributeHolder$ConflictingAttributesInNestMember",
"BadNestMembersLength",
"BadNestMembersEntry",
"DuplicateNestMemberEntry",
! "NestmateAttributeHolder$BadNestTop",
};
String[] messages = new String[] {
! "Multiple MemberOfNest attributes in class file",
"Multiple NestMembers attributes in class file",
! "Conflicting NestMembers and MemberOfNest attributes",
! "Conflicting MemberOfNest and NestMembers attributes",
"Wrong NestMembers attribute length",
"Nest member class_info_index 9 has bad constant type",
"Duplicate entry in NestMembers ",
! "Nest top class_info_index 10 has bad constant type",
};
for (int i = 0; i < badClasses.length; i++ ) {
try {
Class c = Class.forName(badClasses[i]);
--- 23,65 ----
/*
* @test
* @bug 8046171
* @summary Test incorrect use of Nestmate related attributes
! * @compile TwoNestHost.jcod
* TwoNestMembers.jcod
! * ConflictingAttributesInNestHost.jcod
* ConflictingAttributesInNestMember.jcod
* BadNestMembersLength.jcod
* BadNestMembersEntry.jcod
* DuplicateNestMemberEntry.jcod
! * BadNestHost.jcod
* @run main TestNestmateAttributes
*/
public class TestNestmateAttributes {
public static void main(String args[]) throws Throwable {
String[] badClasses = new String[] {
! "NestmateAttributeHolder$TwoNestHost",
"NestmateAttributeHolder",
! "ConflictingAttributesInNestHost",
"NestmateAttributeHolder$ConflictingAttributesInNestMember",
"BadNestMembersLength",
"BadNestMembersEntry",
"DuplicateNestMemberEntry",
! "NestmateAttributeHolder$BadNestHost",
};
String[] messages = new String[] {
! "Multiple NestHost attributes in class file",
"Multiple NestMembers attributes in class file",
! "Conflicting NestMembers and NestHost attributes",
! "Conflicting NestHost and NestMembers attributes",
"Wrong NestMembers attribute length",
"Nest member class_info_index 9 has bad constant type",
"Duplicate entry in NestMembers ",
! "Nest-host class_info_index 10 has bad constant type",
};
for (int i = 0; i < badClasses.length; i++ ) {
try {
Class c = Class.forName(badClasses[i]);
< prev index next >