--- old/src/hotspot/share/classfile/classFileParser.cpp 2017-10-13 02:02:21.347939272 -0400 +++ new/src/hotspot/share/classfile/classFileParser.cpp 2017-10-13 02:02:19.723846324 -0400 @@ -3310,7 +3310,7 @@ bool parsed_sourcefile_attribute = false; bool parsed_innerclasses_attribute = false; bool parsed_nest_members_attribute = false; - bool parsed_member_of_nest_attribute = false; + bool parsed_nest_host_attribute = false; bool parsed_enclosingmethod_attribute = false; bool parsed_bootstrap_methods_attribute = false; const u1* runtime_visible_annotations = NULL; @@ -3377,28 +3377,28 @@ } else { parsed_nest_members_attribute = true; } - if (parsed_member_of_nest_attribute) { - classfile_parse_error("Conflicting MemberOfNest and NestMembers attributes in class file %s", CHECK); + if (parsed_nest_host_attribute) { + classfile_parse_error("Conflicting NestHost and NestMembers attributes in class file %s", CHECK); } nest_members_attribute_start = cfs->current(); nest_members_attribute_length = attribute_length; cfs->skip_u1(nest_members_attribute_length, CHECK); - } else if (tag == vmSymbols::tag_member_of_nest()) { - if (parsed_member_of_nest_attribute) { - classfile_parse_error("Multiple MemberOfNest attributes in class file %s", CHECK); + } else if (tag == vmSymbols::tag_nest_host()) { + if (parsed_nest_host_attribute) { + classfile_parse_error("Multiple NestHost attributes in class file %s", CHECK); } else { - parsed_member_of_nest_attribute = true; + parsed_nest_host_attribute = true; } if (parsed_nest_members_attribute) { - classfile_parse_error("Conflicting NestMembers and MemberOfNest attributes in class file %s", CHECK); + classfile_parse_error("Conflicting NestMembers and NestHost attributes in class file %s", CHECK); } cfs->guarantee_more(2, CHECK); u2 class_info_index = cfs->get_u2_fast(); check_property( valid_klass_reference_at(class_info_index), - "Nest top class_info_index %u has bad constant type in class file %s", + "Nest-host class_info_index %u has bad constant type in class file %s", class_info_index, CHECK); - _nest_top = class_info_index; + _nest_host = class_info_index; } else if (tag == vmSymbols::tag_synthetic()) { // Check for Synthetic tag // Shouldn't we check that the synthetic flags wasn't already set? - not required in spec @@ -3618,7 +3618,7 @@ this_klass->set_methods(_methods); this_klass->set_inner_classes(_inner_classes); this_klass->set_nest_members(_nest_members); - this_klass->set_nest_top_index(_nest_top); + this_klass->set_nest_host_index(_nest_host); this_klass->set_local_interfaces(_local_interfaces); this_klass->set_transitive_interfaces(_transitive_interfaces); this_klass->set_annotations(_combined_annotations); @@ -5695,7 +5695,7 @@ _methods(NULL), _inner_classes(NULL), _nest_members(NULL), - _nest_top(0), + _nest_host(0), _local_interfaces(NULL), _transitive_interfaces(NULL), _combined_annotations(NULL), --- old/src/hotspot/share/classfile/classFileParser.hpp 2017-10-13 02:02:26.008205981 -0400 +++ new/src/hotspot/share/classfile/classFileParser.hpp 2017-10-13 02:02:24.340110514 -0400 @@ -98,7 +98,7 @@ Array* _methods; Array* _inner_classes; Array* _nest_members; - u2 _nest_top; + u2 _nest_host; Array* _local_interfaces; Array* _transitive_interfaces; Annotations* _combined_annotations; --- old/src/hotspot/share/classfile/vmSymbols.hpp 2017-10-13 02:02:30.860483680 -0400 +++ new/src/hotspot/share/classfile/vmSymbols.hpp 2017-10-13 02:02:29.200388674 -0400 @@ -142,7 +142,7 @@ template(tag_source_file, "SourceFile") \ template(tag_inner_classes, "InnerClasses") \ template(tag_nest_members, "NestMembers") \ - template(tag_member_of_nest, "MemberOfNest") \ + template(tag_nest_host, "NestHost") \ template(tag_constant_value, "ConstantValue") \ template(tag_code, "Code") \ template(tag_exceptions, "Exceptions") \ --- old/src/hotspot/share/oops/instanceKlass.cpp 2017-10-13 02:02:35.740762982 -0400 +++ new/src/hotspot/share/oops/instanceKlass.cpp 2017-10-13 02:02:34.128670720 -0400 @@ -150,7 +150,7 @@ if (_nest_members == NULL || _nest_members == Universe::the_empty_short_array()) { if (log_is_enabled(Trace, class, nestmates)) { ResourceMark rm(THREAD); - log_trace(class, nestmates)("Checking nest membership of %s in non-nest-top class %s", + log_trace(class, nestmates)("Checking nest membership of %s in non-nest-host class %s", k->name()->as_C_string(), this->name()->as_C_string()); } return false; @@ -187,27 +187,27 @@ return false; } -// Return nest top class, resolving, validating and saving it if needed -InstanceKlass* InstanceKlass::nest_top(TRAPS) { - InstanceKlass* nest_top_k = _nest_top; - if (nest_top_k == NULL) { - // need to resolve and save our nest top class. This could be attempted +// Return nest-host class, resolving, validating and saving it if needed +InstanceKlass* InstanceKlass::nest_host(TRAPS) { + InstanceKlass* nest_host_k = _nest_host; + if (nest_host_k == NULL) { + // need to resolve and save our nest-host class. This could be attempted // concurrently but as the result is idempotent and we don't use the class // then we do not need any synchronization beyond what is implicitly used // during class loading. - if (_nest_top_index != 0) { // we have a real nest_top + if (_nest_host_index != 0) { // we have a real nest_host if (log_is_enabled(Trace, class, nestmates)) { ResourceMark rm(THREAD); - log_trace(class, nestmates)("Resolving nest top of %s using cp entry for %s", + log_trace(class, nestmates)("Resolving nest-host of %s using cp entry for %s", this->name()->as_C_string(), - _constants->klass_name_at(_nest_top_index)->as_C_string()); + _constants->klass_name_at(_nest_host_index)->as_C_string()); } - Klass* k = _constants->klass_at(_nest_top_index, CHECK_NULL); + Klass* k = _constants->klass_at(_nest_host_index, CHECK_NULL); if (log_is_enabled(Trace, class, nestmates)) { ResourceMark rm(THREAD); - log_trace(class, nestmates)("Resolved nest top of %s to %s", + log_trace(class, nestmates)("Resolved nest-host of %s to %s", this->name()->as_C_string(), k->name()->as_C_string()); } @@ -216,37 +216,37 @@ Exceptions::fthrow( THREAD_AND_LOCATION, vmSymbols::java_lang_IncompatibleClassChangeError(), - "class %s has non-instance class %s as nest-top", + "class %s has non-instance class %s as nest-host", this->external_name(), k->external_name() ); return NULL; } - nest_top_k = InstanceKlass::cast(k); + nest_host_k = InstanceKlass::cast(k); - bool is_member = nest_top_k->has_nest_member(this, CHECK_NULL); + bool is_member = nest_host_k->has_nest_member(this, CHECK_NULL); if (!is_member) { - // this_k and nest_top disagree about nest membership + // this_k and nest_host disagree about nest membership ResourceMark rm(THREAD); Exceptions::fthrow( THREAD_AND_LOCATION, vmSymbols::java_lang_IncompatibleClassChangeError(), "Type %s is not a nest member of %s", this->external_name(), - nest_top_k->external_name() + nest_host_k->external_name() ); return NULL; } - if (!is_same_class_package(nest_top_k)) { + if (!is_same_class_package(nest_host_k)) { ResourceMark rm(THREAD); Exceptions::fthrow( THREAD_AND_LOCATION, vmSymbols::java_lang_IncompatibleClassChangeError(), - "Class %s is in a different package to its nest top class %s", + "Class %s is in a different package to its nest-host class %s", this->external_name(), - nest_top_k->external_name() + nest_host_k->external_name() ); return NULL; } @@ -254,29 +254,29 @@ else { if (log_is_enabled(Trace, class, nestmates)) { ResourceMark rm(THREAD); - log_trace(class, nestmates)("Class %s is not part of a nest: setting nest top to self", + log_trace(class, nestmates)("Class %s is not part of a nest: setting nest-host to self", this->name()->as_C_string()); } - nest_top_k = const_cast(this); + nest_host_k = const_cast(this); } } - // save resolved nest-top value - _nest_top = nest_top_k; + // save resolved nest-host value + _nest_host = nest_host_k; - return nest_top_k; + return nest_host_k; } -// check if 'this' and k are nestmates (same nest_top), or k is our nest_top, -// or we are k's nest_top - all of which is covered by comparing the two -// resolved_nest_tops +// check if 'this' and k are nestmates (same nest_host), or k is our nest_host, +// or we are k's nest_host - all of which is covered by comparing the two +// resolved_nest_hosts bool InstanceKlass::has_nestmate_access_to(InstanceKlass* k, TRAPS) { - // If not actually nestmates, then both nest-top classes may have to loaded + // If not actually nestmates, then both nest-host classes may have to loaded // and the nest membership of each class validated. - InstanceKlass* cur_top = nest_top(CHECK_false); - Klass* k_nest_top = k->nest_top(CHECK_false); + InstanceKlass* cur_top = nest_host(CHECK_false); + Klass* k_nest_host = k->nest_host(CHECK_false); - bool access = (cur_top == k_nest_top); + bool access = (cur_top == k_nest_host); if (log_is_enabled(Trace, class, nestmates)) { ResourceMark rm(THREAD); @@ -370,8 +370,8 @@ _itable_len(parser.itable_size()), _reference_type(parser.reference_type()), _nest_members(NULL), - _nest_top_index(0), - _nest_top(NULL) { + _nest_host_index(0), + _nest_host(NULL) { set_vtable_length(parser.vtable_size()); set_kind(kind); set_access_flags(parser.access_flags()); @@ -2242,8 +2242,8 @@ _methods_jmethod_ids = NULL; _jni_ids = NULL; _oop_map_cache = NULL; - // clear _nest_top to ensure re-load at runtime - _nest_top = NULL; + // clear _nest_host to ensure re-load at runtime + _nest_host = NULL; } void InstanceKlass::remove_java_mirror() { --- old/src/hotspot/share/oops/instanceKlass.hpp 2017-10-13 02:02:40.357027174 -0400 +++ new/src/hotspot/share/oops/instanceKlass.hpp 2017-10-13 02:02:38.688931711 -0400 @@ -170,13 +170,13 @@ // class info index for the class that is a nest member Array* _nest_members; - // The MemberOfNest attribute. The class info index for the class - // that is the nest-top of this class - jushort _nest_top_index; + // The NestHost attribute. The class info index for the class + // that is the nest-host of this class + jushort _nest_host_index; - // Resolved nest-top klass: either true nest-top or self if we are not nested. + // Resolved nest-host klass: either true nest-host or self if we are not nested. // By always being set it makes nest-member access checks simpler. - InstanceKlass* _nest_top; + InstanceKlass* _nest_host; // the source debug extension for this klass, NULL if not specified. // Specified as UTF-8 string without terminating zero byte in the classfile, @@ -447,16 +447,16 @@ Array* nest_members() const { return _nest_members; } void set_nest_members(Array* m) { _nest_members = m; } - // nest-top index - jushort nest_top_index() const { return _nest_top_index; } - void set_nest_top_index(u2 i) { _nest_top_index = i; } + // nest-host index + jushort nest_host_index() const { return _nest_host_index; } + void set_nest_host_index(u2 i) { _nest_host_index = i; } - // Returns nest-top class, resolving and validating it if needed + // Returns nest-host class, resolving and validating it if needed // Returns NULL if an exception occurs during loading, or validation fails - InstanceKlass* nest_top(TRAPS); - InstanceKlass* raw_nest_top() { return _nest_top; } // debugging + InstanceKlass* nest_host(TRAPS); + InstanceKlass* raw_nest_host() { return _nest_host; } // debugging - // Called to verify that k is a member of this nest - does not look at k's nest-top + // Called to verify that k is a member of this nest - does not look at k's nest-host bool has_nest_member(InstanceKlass* k, TRAPS) const; // Check if this klass is a nestmate of k bool has_nestmate_access_to(InstanceKlass* k, TRAPS); --- old/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Attribute.java 2017-10-13 02:02:45.033294802 -0400 +++ new/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Attribute.java 2017-10-13 02:02:43.353198648 -0400 @@ -321,19 +321,19 @@ } } - public static class MemberOfNest extends Attribute { + public static class NestHost extends Attribute { byte[] bytes; String clazz; - public MemberOfNest() { - super("MemberOfNest"); + public NestHost() { + super("NestHost"); } @Override protected Attribute read(ClassReader cr, int off, int len, char[] buf, int codeOff, Label[] labels) { int offset = off; - MemberOfNest a = new MemberOfNest(); + NestHost a = new NestHost(); a.clazz = cr.readClass(off, buf); a.bytes = Arrays.copyOfRange(cr.b, offset, offset + len); return a; @@ -349,6 +349,6 @@ static final Attribute[] DEFAULT_ATTRIBUTE_PROTOS = new Attribute[] { new NestMembers(), - new MemberOfNest() + new NestHost() }; } --- old/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java 2017-10-13 02:02:50.121586007 -0400 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java 2017-10-13 02:02:48.393487107 -0400 @@ -1117,11 +1117,11 @@ } /** - * Write MemberOfNest attribute (if needed) + * Write NestHost attribute (if needed) */ - int writeMemberOfNestIfNeeded(ClassSymbol csym) { + int writeNestHostIfNeeded(ClassSymbol csym) { if (csym.owner.kind != PCK) { - int alenIdx = writeAttr(names.MemberOfNest); + int alenIdx = writeAttr(names.NestHost); databuf.appendChar(pool.put(csym.outermostClass())); endAttr(alenIdx); return 1; @@ -1880,7 +1880,7 @@ // that check really belongs, but this works. if (target.hasNestmateAccess()) { acount += writeNestMembersIfNeeded(c); - acount += writeMemberOfNestIfNeeded(c); + acount += writeNestHostIfNeeded(c); } } --- old/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java 2017-10-13 02:02:55.017866223 -0400 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java 2017-10-13 02:02:53.005751069 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -149,10 +149,10 @@ public final Name LineNumberTable; public final Name LocalVariableTable; public final Name LocalVariableTypeTable; - public final Name MemberOfNest; public final Name MethodParameters; public final Name Module; public final Name ModuleResolution; + public final Name NestHost; public final Name NestMembers; public final Name RuntimeInvisibleAnnotations; public final Name RuntimeInvisibleParameterAnnotations; @@ -314,10 +314,10 @@ LineNumberTable = fromString("LineNumberTable"); LocalVariableTable = fromString("LocalVariableTable"); LocalVariableTypeTable = fromString("LocalVariableTypeTable"); - MemberOfNest = fromString("MemberOfNest"); MethodParameters = fromString("MethodParameters"); Module = fromString("Module"); ModuleResolution = fromString("ModuleResolution"); + NestHost = fromString("NestHost"); NestMembers = fromString("NestMembers"); RuntimeInvisibleAnnotations = fromString("RuntimeInvisibleAnnotations"); RuntimeInvisibleParameterAnnotations = fromString("RuntimeInvisibleParameterAnnotations"); --- old/src/jdk.jdeps/share/classes/com/sun/tools/classfile/Attribute.java 2017-10-13 02:03:01.278224507 -0400 +++ new/src/jdk.jdeps/share/classes/com/sun/tools/classfile/Attribute.java 2017-10-13 02:02:59.414117823 -0400 @@ -51,7 +51,6 @@ public static final String LineNumberTable = "LineNumberTable"; public static final String LocalVariableTable = "LocalVariableTable"; public static final String LocalVariableTypeTable = "LocalVariableTypeTable"; - public static final String MemberOfNest = "MemberOfNest"; public static final String MethodParameters = "MethodParameters"; public static final String Module = "Module"; public static final String ModuleHashes = "ModuleHashes"; @@ -59,6 +58,7 @@ public static final String ModulePackages = "ModulePackages"; public static final String ModuleResolution = "ModuleResolution"; public static final String ModuleTarget = "ModuleTarget"; + public static final String NestHost = "NestHost"; public static final String NestMembers = "NestMembers"; public static final String RuntimeVisibleAnnotations = "RuntimeVisibleAnnotations"; public static final String RuntimeInvisibleAnnotations = "RuntimeInvisibleAnnotations"; @@ -125,7 +125,6 @@ standardAttributes.put(LineNumberTable, LineNumberTable_attribute.class); standardAttributes.put(LocalVariableTable, LocalVariableTable_attribute.class); standardAttributes.put(LocalVariableTypeTable, LocalVariableTypeTable_attribute.class); - standardAttributes.put(MemberOfNest, MemberOfNest_attribute.class); standardAttributes.put(MethodParameters, MethodParameters_attribute.class); standardAttributes.put(Module, Module_attribute.class); standardAttributes.put(ModuleHashes, ModuleHashes_attribute.class); @@ -133,6 +132,7 @@ standardAttributes.put(ModulePackages, ModulePackages_attribute.class); standardAttributes.put(ModuleResolution, ModuleResolution_attribute.class); standardAttributes.put(ModuleTarget, ModuleTarget_attribute.class); + standardAttributes.put(NestHost, NestHost_attribute.class); standardAttributes.put(NestMembers, NestMembers_attribute.class); standardAttributes.put(RuntimeInvisibleAnnotations, RuntimeInvisibleAnnotations_attribute.class); standardAttributes.put(RuntimeInvisibleParameterAnnotations, RuntimeInvisibleParameterAnnotations_attribute.class); @@ -190,7 +190,6 @@ R visitLineNumberTable(LineNumberTable_attribute attr, P p); R visitLocalVariableTable(LocalVariableTable_attribute attr, P p); R visitLocalVariableTypeTable(LocalVariableTypeTable_attribute attr, P p); - R visitMemberOfNest(MemberOfNest_attribute attr, P p); R visitMethodParameters(MethodParameters_attribute attr, P p); R visitModule(Module_attribute attr, P p); R visitModuleHashes(ModuleHashes_attribute attr, P p); @@ -198,6 +197,7 @@ R visitModulePackages(ModulePackages_attribute attr, P p); R visitModuleResolution(ModuleResolution_attribute attr, P p); R visitModuleTarget(ModuleTarget_attribute attr, P p); + R visitNestHost(NestHost_attribute attr, P p); R visitNestMembers(NestMembers_attribute attr, P p); R visitRuntimeVisibleAnnotations(RuntimeVisibleAnnotations_attribute attr, P p); R visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations_attribute attr, P p); --- old/src/jdk.jdeps/share/classes/com/sun/tools/classfile/ClassWriter.java 2017-10-13 02:03:05.890488469 -0400 +++ new/src/jdk.jdeps/share/classes/com/sun/tools/classfile/ClassWriter.java 2017-10-13 02:03:04.126387508 -0400 @@ -523,7 +523,7 @@ } @Override - public Void visitMemberOfNest(MemberOfNest_attribute attr, ClassOutputStream out) { + public Void visitNestHost(NestHost_attribute attr, ClassOutputStream out) { out.writeShort(attr.top_index); return null; } --- old/src/jdk.jdeps/share/classes/com/sun/tools/javap/AttributeWriter.java 2017-10-13 02:03:10.698763647 -0400 +++ new/src/jdk.jdeps/share/classes/com/sun/tools/javap/AttributeWriter.java 2017-10-13 02:03:09.010667037 -0400 @@ -47,7 +47,6 @@ import com.sun.tools.classfile.LineNumberTable_attribute; import com.sun.tools.classfile.LocalVariableTable_attribute; import com.sun.tools.classfile.LocalVariableTypeTable_attribute; -import com.sun.tools.classfile.MemberOfNest_attribute; import com.sun.tools.classfile.MethodParameters_attribute; import com.sun.tools.classfile.Module_attribute; import com.sun.tools.classfile.ModuleHashes_attribute; @@ -55,6 +54,7 @@ import com.sun.tools.classfile.ModulePackages_attribute; import com.sun.tools.classfile.ModuleResolution_attribute; import com.sun.tools.classfile.ModuleTarget_attribute; +import com.sun.tools.classfile.NestHost_attribute; import com.sun.tools.classfile.NestMembers_attribute; import com.sun.tools.classfile.RuntimeInvisibleAnnotations_attribute; import com.sun.tools.classfile.RuntimeInvisibleParameterAnnotations_attribute; @@ -401,8 +401,8 @@ } @Override - public Void visitMemberOfNest(MemberOfNest_attribute attr, Void aVoid) { - print("MemberOfNest: "); + public Void visitNestHost(NestHost_attribute attr, Void aVoid) { + print("NestHost: "); constantWriter.write(attr.top_index); println(); return null; --- old/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/BadNestMembersEntry.jcod 2017-10-13 02:03:15.667047984 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/BadNestMembersEntry.jcod 2017-10-13 02:03:13.826942674 -0400 @@ -24,7 +24,7 @@ /* Source: NestmateAttributeHolder.java public class NestmateAttributeHolder { - public static class TwoMemberOfNest { + public static class TwoNestHost { } } */ @@ -41,7 +41,7 @@ class #15; // #2 class #16; // #3 class #17; // #4 - Utf8 "TwoMemberOfNest"; // #5 + Utf8 "TwoNestHost"; // #5 Utf8 "InnerClasses"; // #6 Utf8 ""; // #7 Utf8 "()V"; // #8 @@ -53,7 +53,7 @@ NameAndType #7 #8; // #14 Utf8 "BadNestMembersEntry"; // #15 Utf8 "java/lang/Object"; // #16 - Utf8 "BadNestMembersEntry$TwoMemberOfNest"; // #17 + Utf8 "BadNestMembersEntry$TwoNestHost"; // #17 } // Constant Pool 0x0021; // access --- old/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/BadNestMembersLength.jcod 2017-10-13 02:03:20.595330031 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/BadNestMembersLength.jcod 2017-10-13 02:03:18.907233421 -0400 @@ -24,7 +24,7 @@ /* Source: NestmateAttributeHolder.java public class NestmateAttributeHolder { - public static class TwoMemberOfNest { + public static class TwoNestHost { } } */ @@ -41,7 +41,7 @@ class #15; // #2 class #16; // #3 class #17; // #4 - Utf8 "TwoMemberOfNest"; // #5 + Utf8 "TwoNestHost"; // #5 Utf8 "InnerClasses"; // #6 Utf8 ""; // #7 Utf8 "()V"; // #8 @@ -53,7 +53,7 @@ NameAndType #7 #8; // #14 Utf8 "BadNestMembersLength"; // #15 Utf8 "java/lang/Object"; // #16 - Utf8 "BadNestMembersLength$TwoMemberOfNest"; // #17 + Utf8 "BadNestMembersLength$TwoNestHost"; // #17 } // Constant Pool 0x0021; // access --- old/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/ConflictingAttributesInNestMember.jcod 2017-10-13 02:03:25.251596510 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/ConflictingAttributesInNestMember.jcod 2017-10-13 02:03:23.459493948 -0400 @@ -24,7 +24,7 @@ /* Source: NestmateAttributeHolder.java public class NestmateAttributeHolder { - public static class TwoMemberOfNest { + public static class TwoNestHost { } } */ @@ -44,7 +44,7 @@ Utf8 "LineNumberTable"; // #7 Utf8 "SourceFile"; // #8 Utf8 "NestmateAttributeHolder.java"; // #9 - Utf8 "MemberOfNest"; // #10 + Utf8 "NestHost"; // #10 class #17; // #11 NameAndType #4 #5; // #12 Utf8 "NestmateAttributeHolder$ConflictingAttributesInNestMember"; // #13 @@ -96,9 +96,9 @@ #9; } // end SourceFile ; - Attr(#10) { // MemberOfNest + Attr(#10) { // NestHost 0x000B; - } // end MemberOfNest + } // end NestHost ; // conflict: can't have nest members when you are a member of a nest Attr(#18) { // NestMembers --- old/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/DuplicateNestMemberEntry.jcod 2017-10-13 02:03:30.059871688 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/DuplicateNestMemberEntry.jcod 2017-10-13 02:03:28.343773476 -0400 @@ -24,7 +24,7 @@ /* Source: NestmateAttributeHolder.java public class NestmateAttributeHolder { - public static class TwoMemberOfNest { + public static class TwoNestHost { } } */ @@ -41,7 +41,7 @@ class #15; // #2 class #16; // #3 class #17; // #4 - Utf8 "TwoMemberOfNest"; // #5 + Utf8 "TwoNestHost"; // #5 Utf8 "InnerClasses"; // #6 Utf8 ""; // #7 Utf8 "()V"; // #8 @@ -53,7 +53,7 @@ NameAndType #7 #8; // #14 Utf8 "DuplicateNestMemberEntry"; // #15 Utf8 "java/lang/Object"; // #16 - Utf8 "DuplicateNestMemberEntry$TwoMemberOfNest"; // #17 + Utf8 "DuplicateNestMemberEntry$TwoNestHost"; // #17 } // Constant Pool 0x0021; // access --- old/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/TestNestmateAttributes.java 2017-10-13 02:03:34.708137710 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/TestNestmateAttributes.java 2017-10-13 02:03:32.988039267 -0400 @@ -25,39 +25,39 @@ * @test * @bug 8046171 * @summary Test incorrect use of Nestmate related attributes - * @compile TwoMemberOfNest.jcod + * @compile TwoNestHost.jcod * TwoNestMembers.jcod - * ConflictingAttributesInNestTop.jcod + * ConflictingAttributesInNestHost.jcod * ConflictingAttributesInNestMember.jcod * BadNestMembersLength.jcod * BadNestMembersEntry.jcod * DuplicateNestMemberEntry.jcod - * BadNestTop.jcod + * BadNestHost.jcod * @run main TestNestmateAttributes */ public class TestNestmateAttributes { public static void main(String args[]) throws Throwable { String[] badClasses = new String[] { - "NestmateAttributeHolder$TwoMemberOfNest", + "NestmateAttributeHolder$TwoNestHost", "NestmateAttributeHolder", - "ConflictingAttributesInNestTop", + "ConflictingAttributesInNestHost", "NestmateAttributeHolder$ConflictingAttributesInNestMember", "BadNestMembersLength", "BadNestMembersEntry", "DuplicateNestMemberEntry", - "NestmateAttributeHolder$BadNestTop", + "NestmateAttributeHolder$BadNestHost", }; String[] messages = new String[] { - "Multiple MemberOfNest attributes in class file", + "Multiple NestHost attributes in class file", "Multiple NestMembers attributes in class file", - "Conflicting NestMembers and MemberOfNest attributes", - "Conflicting MemberOfNest and NestMembers attributes", + "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 top class_info_index 10 has bad constant type", + "Nest-host class_info_index 10 has bad constant type", }; for (int i = 0; i < badClasses.length; i++ ) { @@ -74,4 +74,4 @@ } } } -} \ No newline at end of file +} --- old/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/TwoNestMembers.jcod 2017-10-13 02:03:39.368404417 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/TwoNestMembers.jcod 2017-10-13 02:03:37.668307120 -0400 @@ -24,7 +24,7 @@ /* Source: NestmateAttributeHolder.java public class NestmateAttributeHolder { - public static class TwoMemberOfNest { + public static class TwoNestHost { } } */ @@ -41,7 +41,7 @@ class #15; // #2 class #16; // #3 class #17; // #4 - Utf8 "TwoMemberOfNest"; // #5 + Utf8 "TwoNestHost"; // #5 Utf8 "InnerClasses"; // #6 Utf8 ""; // #7 Utf8 "()V"; // #8 @@ -53,7 +53,7 @@ NameAndType #7 #8; // #14 Utf8 "NestmateAttributeHolder"; // #15 Utf8 "java/lang/Object"; // #16 - Utf8 "NestmateAttributeHolder$TwoMemberOfNest"; // #17 + Utf8 "NestmateAttributeHolder$TwoNestHost"; // #17 } // Constant Pool 0x0021; // access --- old/test/hotspot/jtreg/runtime/Nestmates/membership/NotAMember.jcod 2017-10-13 02:03:43.920664942 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/membership/NotAMember.jcod 2017-10-13 02:03:42.276570849 -0400 @@ -23,7 +23,7 @@ /* Generated from: TestNestmateMembership.java - MemberOfNest attribute is modified to refer to Object + NestHost attribute is modified to refer to Object */ class TestNestmateMembership$NotAMember { @@ -45,7 +45,7 @@ Utf8 "m"; // #11 Utf8 "SourceFile"; // #12 Utf8 "TestNestmateMembership.java"; // #13 - Utf8 "MemberOfNest"; // #14 + Utf8 "NestHost"; // #14 class #26; // #15 NameAndType #7 #8; // #16 class #27; // #17 @@ -133,9 +133,9 @@ #13; } // end SourceFile ; - Attr(#14) { // MemberOfNest - modified + Attr(#14) { // NestHost - modified 0x0006; - } // end MemberOfNest + } // end NestHost ; Attr(#24) { // InnerClasses [] { // InnerClasses --- old/test/hotspot/jtreg/runtime/Nestmates/membership/NotAMember2.java 2017-10-13 02:03:48.484926155 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/membership/NotAMember2.java 2017-10-13 02:03:46.784828857 -0400 @@ -22,9 +22,9 @@ */ public class NotAMember2 { - // jcod modified to have a nest-top which does not include this class + // jcod modified to have a nest-host which does not include this class public static class Member { - // this generates a CP entry we can use for the nest-top + // this generates a CP entry we can use for the nest-host static Class tc = TestNestmateMembership.class; // jcod modified to be private --- old/test/hotspot/jtreg/runtime/Nestmates/membership/NotAMember2.jcod 2017-10-13 02:03:53.097190114 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/membership/NotAMember2.jcod 2017-10-13 02:03:51.393092589 -0400 @@ -23,7 +23,7 @@ /* Generated from: NotAMember2.java - MemberOfNest attribute is modified to refer to TestNestmateMembership. + NestHost attribute is modified to refer to TestNestmateMembership. m() is declared private */ @@ -51,7 +51,7 @@ Utf8 ""; // #16 Utf8 "SourceFile"; // #17 Utf8 "NotAMember2.java"; // #18 - Utf8 "MemberOfNest"; // #19 + Utf8 "NestHost"; // #19 class #33; // #20 NameAndType #11 #12; // #21 class #34; // #22 @@ -172,9 +172,9 @@ #18; } // end SourceFile ; - Attr(#19) { // MemberOfNest - modified + Attr(#19) { // NestHost - modified 0x0005; - } // end MemberOfNest + } // end NestHost ; Attr(#31) { // InnerClasses [] { // InnerClasses --- old/test/hotspot/jtreg/runtime/Nestmates/membership/TestNestmateMembership.java 2017-10-13 02:03:58.113477196 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/membership/TestNestmateMembership.java 2017-10-13 02:03:56.449381960 -0400 @@ -24,48 +24,48 @@ /* * @test * @bug 8046171 - * @summary Test the various rules for nest members and nest-tops + * @summary Test the various rules for nest members and nest-hosts * @compile TestNestmateMembership.java - * PackagedNestTop.java - * PackagedNestTop2.java + * PackagedNestHost.java + * PackagedNestHost2.java * NotAMember2.java - * @compile MissingNestTop.jcod - * ArrayNestTop.jcod + * @compile MissingNestHost.jcod + * ArrayNestHost.jcod * NotAMember.jcod * NotAMember2.jcod - * PackagedNestTop.jcod - * PackagedNestTop2Member.jcod + * PackagedNestHost.jcod + * PackagedNestHost2Member.jcod * @run main/othervm TestNestmateMembership */ -// We test all the "illegal" relationships between a nest member and its nest-top +// We test all the "illegal" relationships between a nest member and its nest-host // except for the case where the name of the nest-member matches the name listed -// in the nest-top, but resolves to a different class. There doesn't seem to +// in the nest-host, but resolves to a different class. There doesn't seem to // be a way to construct that scenario. // For each nested class below there is a corresponding .jcod file which breaks one // of the rules regarding nest membership. For the package related tests we have -// additional PackageNestTop*.java sources. We also have NotAMember2.java. +// additional PackageNestHost*.java sources. We also have NotAMember2.java. // Note that all the .java files must be compiled in the same step, while all // .jcod files must be compiled in a later step. public class TestNestmateMembership { - // jcod modified to have non-existent nest-top - static class MissingNestTop { + // jcod modified to have non-existent nest-host + static class MissingNestHost { private static void m() { - System.out.println("MissingNestTop.m() - java version"); + System.out.println("MissingNestHost.m() - java version"); } } - // jcod modified to have non-instance class Object[] as nest-top - static class ArrayNestTop { + // jcod modified to have non-instance class Object[] as nest-host + static class ArrayNestHost { Object[] oa; // create CP entry private static void m() { - System.out.println("ArrayTop.m() - java version"); + System.out.println("ArrayNestHost.m() - java version"); } } - // jcod modified to have Object as nest-top, which has no nest-members + // jcod modified to have Object as nest-host, which has no nest-members static class NotAMember { private static void m() { System.out.println("NotAMember.m() - java version"); @@ -73,19 +73,19 @@ } public static void main(String[] args) throws Throwable { - test_MissingNestTop(); - test_ArrayNestTop(); + test_MissingNestHost(); + test_ArrayNestHost(); test_WrongPackageForNestMember(); test_NotAMember(); test_NotAMember2(); } static void test_WrongPackageForNestMember() { - System.out.println("Testing for nest-top and nest-member in different packages"); - String msg = "Class P2.PackagedNestTop2$Member is in a different" + - " package to its nest top class P1.PackagedNestTop"; + System.out.println("Testing for nest-host and nest-member in different packages"); + String msg = "Class P2.PackagedNestHost2$Member is in a different" + + " package to its nest-host class P1.PackagedNestHost"; try { - P1.PackagedNestTop.doAccess(); + P1.PackagedNestHost.doAccess(); throw new Error("Missing IncompatibleClassChangeError: " + msg); } catch (IncompatibleClassChangeError expected) { @@ -97,11 +97,11 @@ } } - static void test_MissingNestTop() throws Throwable { - System.out.println("Testing for nest-top class that does not exist"); + static void test_MissingNestHost() throws Throwable { + System.out.println("Testing for nest-host class that does not exist"); String msg = "NoSuchClass"; try { - MissingNestTop.m(); + MissingNestHost.m(); throw new Error("Missing NoClassDefFoundError: " + msg); } catch (NoClassDefFoundError expected) { @@ -113,11 +113,11 @@ } } - static void test_ArrayNestTop() throws Throwable { - System.out.println("Testing for nest-top class that is not an instance class"); - String msg = "ArrayNestTop has non-instance class [Ljava.lang.Object; as nest-top"; + static void test_ArrayNestHost() throws Throwable { + System.out.println("Testing for nest-host class that is not an instance class"); + String msg = "ArrayNestHost has non-instance class [Ljava.lang.Object; as nest-host"; try { - ArrayNestTop.m(); + ArrayNestHost.m(); throw new Error("Missing IncompatibleClassChangeError: " + msg); } catch (IncompatibleClassChangeError expected) { @@ -130,7 +130,7 @@ } static void test_NotAMember() throws Throwable { - System.out.println("Testing for nest-top class that has no nest"); + System.out.println("Testing for nest-host class that has no nest"); String msg = "NotAMember is not a nest member of java.lang.Object"; try { NotAMember.m(); @@ -146,7 +146,7 @@ } static void test_NotAMember2() throws Throwable { - System.out.println("Testing for nest-top class that doesn't list this class as a member"); + System.out.println("Testing for nest-host class that doesn't list this class as a member"); String msg = "NotAMember2$Member is not a nest member of TestNestmateMembership"; try { NotAMember2.Member.m(); --- old/test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestInvokeSpecial.java 2017-10-13 02:04:04.213826318 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestInvokeSpecial.java 2017-10-13 02:04:02.589733371 -0400 @@ -24,11 +24,11 @@ /* * @test * @bug 8046171 - * @summary Test access to private constructors between nestmates and nest-top + * @summary Test access to private constructors between nestmates and nest-host * using different flavours of named nested types that will * generate invokespecial for the calls. The -Xcomp run is a special * regression test for a compiler assertion that would fire when - * "loading" a nest-top class. + * "loading" a nest-host class. * @run main TestInvokeSpecial * @run main/othervm -Xcomp TestInvokeSpecial */ @@ -105,7 +105,7 @@ } public static void main(String[] args) { - // These initial constructions test nest-top access + // These initial constructions test nest-host access TestInvokeSpecial o = new TestInvokeSpecial(); StaticNested s = new StaticNested(); InnerNested i = o.new InnerNested(); --- old/test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestMethodHandles.java 2017-10-13 02:04:08.746085698 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestMethodHandles.java 2017-10-13 02:04:07.033987715 -0400 @@ -24,7 +24,7 @@ /* * @test * @bug 8046171 - * @summary Test access to private constructors between nestmates and nest-top + * @summary Test access to private constructors between nestmates and nest-host * using different flavours of named nested types using method handles * @run main TestMethodHandles */ @@ -128,7 +128,7 @@ } public static void main(String[] args) throws Throwable { - // These initial constructions test nest-top access + // These initial constructions test nest-host access MethodHandle mh = lookup().findConstructor(TestMethodHandles.class, NOARG_T); TestMethodHandles o = (TestMethodHandles) mh.invoke(); --- old/test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestReflection.java 2017-10-13 02:04:13.294345992 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestReflection.java 2017-10-13 02:04:11.586248239 -0400 @@ -24,7 +24,7 @@ /* * @test * @bug 8046171 - * @summary Test access to private constructors between nestmates and nest-top + * @summary Test access to private constructors between nestmates and nest-host * using different flavours of named nested types using core reflection * @run main TestReflection * @run main/othervm -Dsun.reflect.noInflation=true TestReflection @@ -100,7 +100,7 @@ } public static void main(String[] args) throws Throwable { - // These initial constructions test nest-top access + // These initial constructions test nest-host access TestReflection o = TestReflection.class.getDeclaredConstructor(new Class[0]).newInstance(new Object[0]); StaticNested s = StaticNested.class.getDeclaredConstructor(new Class[0]).newInstance(new Object[0]); InnerNested i = InnerNested.class.getDeclaredConstructor(new Class[] {TestReflection.class}).newInstance(new Object[] { o }); --- old/test/hotspot/jtreg/runtime/Nestmates/privateFields/TestMethodHandles.java 2017-10-13 02:04:18.006615675 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateFields/TestMethodHandles.java 2017-10-13 02:04:16.206512656 -0400 @@ -24,7 +24,7 @@ /* * @test * @bug 8046171 - * @summary Test access to private fields between nestmates and nest-top + * @summary Test access to private fields between nestmates and nest-host * using different flavours of named nested types using method handles * @run main TestMethodHandles */ @@ -34,7 +34,7 @@ public class TestMethodHandles { - // Private field of nest-top for nestmates to access + // Private field of nest-host for nestmates to access private int priv_field; // public constructor so we aren't relying on private access --- old/test/hotspot/jtreg/runtime/Nestmates/privateFields/TestPrivateField.java 2017-10-13 02:04:22.850892912 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateFields/TestPrivateField.java 2017-10-13 02:04:21.106793097 -0400 @@ -24,14 +24,14 @@ /* * @test * @bug 8046171 - * @summary Test access to private fields between nestmates and nest-top + * @summary Test access to private fields between nestmates and nest-host * using different flavours of named nested types * @run main TestPrivateField */ public class TestPrivateField { - // Private field of nest-top for nestmates to access + // Private field of nest-host for nestmates to access private int priv_field; // public constructor so we aren't relying on private access --- old/test/hotspot/jtreg/runtime/Nestmates/privateFields/TestReflection.java 2017-10-13 02:04:27.519160075 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateFields/TestReflection.java 2017-10-13 02:04:25.787060947 -0400 @@ -24,7 +24,7 @@ /* * @test * @bug 8046171 - * @summary Test access to private fields between nestmates and nest-top + * @summary Test access to private fields between nestmates and nest-host * using different flavours of named nested types using core reflection * @run main TestReflection */ @@ -33,7 +33,7 @@ public class TestReflection { - // Private field of nest-top for nestmates to access + // Private field of nest-host for nestmates to access private int priv_field; // public constructor so we aren't relying on private access --- old/test/hotspot/jtreg/runtime/Nestmates/privateMethods/MissingMethod.jcod 2017-10-13 02:04:32.223429297 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateMethods/MissingMethod.jcod 2017-10-13 02:04:30.487329942 -0400 @@ -43,7 +43,7 @@ Utf8 "not_priv_invoke"; // #11 - renamed Utf8 "SourceFile"; // #12 Utf8 "TestInvokeErrors.java"; // #13 - Utf8 "MemberOfNest"; // #14 + Utf8 "NestHost"; // #14 class #26; // #15 NameAndType #7 #8; // #16 class #27; // #17 @@ -131,9 +131,9 @@ #13; } // end SourceFile ; - Attr(#14) { // MemberOfNest + Attr(#14) { // NestHost 0x000F; - } // end MemberOfNest + } // end NestHost ; Attr(#24) { // InnerClasses [] { // InnerClasses --- old/test/hotspot/jtreg/runtime/Nestmates/privateMethods/MissingMethodWithSuper.jcod 2017-10-13 02:04:36.879695774 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateMethods/MissingMethodWithSuper.jcod 2017-10-13 02:04:35.147596646 -0400 @@ -43,7 +43,7 @@ Utf8 "not_priv_invoke"; // #11 - rename Utf8 "SourceFile"; // #12 Utf8 "TestInvokeErrors.java"; // #13 - Utf8 "MemberOfNest"; // #14 + Utf8 "NestHost"; // #14 class #27; // #15 NameAndType #7 #8; // #16 class #28; // #17 @@ -132,9 +132,9 @@ #13; } // end SourceFile ; - Attr(#14) { // MemberOfNest + Attr(#14) { // NestHost 0x000F; - } // end MemberOfNest + } // end NestHost ; Attr(#24) { // InnerClasses [] { // InnerClasses --- old/test/hotspot/jtreg/runtime/Nestmates/privateMethods/StaticIfaceError.jcod 2017-10-13 02:04:41.627967515 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateMethods/StaticIfaceError.jcod 2017-10-13 02:04:40.011875026 -0400 @@ -47,7 +47,7 @@ Utf8 "(LTestInvokeInterface$StaticIface;)V"; // #14 Utf8 "SourceFile"; // #15 Utf8 "TestInvokeInterface.java"; // #16 - Utf8 "MemberOfNest"; // #17 + Utf8 "NestHost"; // #17 class #27; // #18 class #28; // #19 NameAndType #29 #30; // #20 @@ -134,9 +134,9 @@ #16; } // end SourceFile ; - Attr(#17) { // MemberOfNest + Attr(#17) { // NestHost 0x0012; - } // end MemberOfNest + } // end NestHost ; Attr(#13) { // InnerClasses [] { // InnerClasses --- old/test/hotspot/jtreg/runtime/Nestmates/privateMethods/StaticIfaceGood.jcod 2017-10-13 02:04:46.332236738 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateMethods/StaticIfaceGood.jcod 2017-10-13 02:04:44.712144018 -0400 @@ -48,7 +48,7 @@ Utf8 "(LTestInvokeInterface$StaticIface;)V"; // #14 Utf8 "SourceFile"; // #15 Utf8 "TestInvokeInterface.java"; // #16 - Utf8 "MemberOfNest"; // #17 + Utf8 "NestHost"; // #17 class #27; // #18 class #28; // #19 NameAndType #29 #30; // #20 @@ -135,9 +135,9 @@ #16; } // end SourceFile ; - Attr(#17) { // MemberOfNest + Attr(#17) { // NestHost 0x0012; - } // end MemberOfNest + } // end NestHost ; Attr(#13) { // InnerClasses [] { // InnerClasses --- old/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvoke.java 2017-10-13 02:04:51.080508479 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvoke.java 2017-10-13 02:04:49.232402710 -0400 @@ -24,14 +24,14 @@ /* * @test * @bug 8046171 - * @summary Test access to private methods between nestmates and nest-top + * @summary Test access to private methods between nestmates and nest-host * using different flavours of named nested types * @run main TestInvoke */ public class TestInvoke { - // Private method of nest-top for nestmates to access + // Private method of nest-host for nestmates to access private void priv_invoke() { System.out.println("TestInvoke::priv_invoke"); } --- old/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvokeErrors.java 2017-10-13 02:04:56.236803569 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvokeErrors.java 2017-10-13 02:04:54.128682923 -0400 @@ -30,7 +30,7 @@ * @compile TestInvokeErrors.java * @compile MissingMethod.jcod * MissingMethodWithSuper.jcod - * MissingNestTop.jcod + * MissingNestHost.jcod * @run main TestInvokeErrors true * @run main/othervm -Xverify:none TestInvokeErrors false */ @@ -57,10 +57,10 @@ } } - static class MissingNestTop { - // jcod version will change MemberOfNest to a non-existent class + static class MissingNestHost { + // jcod version will change NestHost to a non-existent class private void priv_invoke() { - System.out.println("MissingNestTop::priv_invoke"); + System.out.println("MissingNestHost::priv_invoke"); } } @@ -70,9 +70,9 @@ static class Helper { static void doTest() { try { - MissingNestTop m = new MissingNestTop(); + MissingNestHost m = new MissingNestHost(); m.priv_invoke(); - throw new Error("Unexpected success invoking MissingNestTop.priv_invoke"); + throw new Error("Unexpected success invoking MissingNestHost.priv_invoke"); } catch (NoClassDefFoundError ncdfe) { System.out.println("Got expected exception:" + ncdfe); --- old/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestMethodHandles.java 2017-10-13 02:05:02.541164362 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestMethodHandles.java 2017-10-13 02:04:59.320980074 -0400 @@ -24,7 +24,7 @@ /* * @test * @bug 8046171 - * @summary Test access to private methods between nestmates and nest-top + * @summary Test access to private methods between nestmates and nest-host * using different flavours of named nested types using MethodHandles * @run main TestMethodHandles */ @@ -38,7 +38,7 @@ static final MethodType M_T = MethodType.methodType(void.class); - // Private method of nest-top for nestmates to access + // Private method of nest-host for nestmates to access private void priv_invoke() { System.out.println("TestMethodHandles::priv_invoke"); } --- old/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestReflection.java 2017-10-13 02:05:07.421443657 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestReflection.java 2017-10-13 02:05:05.873355061 -0400 @@ -24,7 +24,7 @@ /* * @test * @bug 8046171 - * @summary Test access to private methods between nestmates and nest-top + * @summary Test access to private methods between nestmates and nest-host * using different flavours of named nested types using core reflection * @run main TestReflection * @run main/othervm -Dsun.reflect.noInflation=true TestReflection @@ -37,7 +37,7 @@ public class TestReflection { - // Private method of nest-top for nestmates to access + // Private method of nest-host for nestmates to access private void priv_invoke() { System.out.println("TestReflection::priv_invoke"); } --- old/test/hotspot/jtreg/runtime/Nestmates/privateStaticFields/TestMethodHandles.java 2017-10-13 02:05:11.989705095 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateStaticFields/TestMethodHandles.java 2017-10-13 02:05:10.281607342 -0400 @@ -24,7 +24,7 @@ /* * @test * @bug 8046171 - * @summary Test access to private static fields between nestmates and nest-top + * @summary Test access to private static fields between nestmates and nest-host * using different flavours of named nested types using core reflection * @run main TestMethodHandles */ @@ -36,7 +36,7 @@ public class TestMethodHandles { - // private static field of nest-top for nestmates to access + // private static field of nest-host for nestmates to access private static int priv_field; // public constructor so we aren't relying on private access --- old/test/hotspot/jtreg/runtime/Nestmates/privateStaticFields/TestPrivateStaticField.java 2017-10-13 02:05:16.765978437 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateStaticFields/TestPrivateStaticField.java 2017-10-13 02:05:15.069881370 -0400 @@ -24,14 +24,14 @@ /* * @test * @bug 8046171 - * @summary Test access to private static fields between nestmates and nest-top + * @summary Test access to private static fields between nestmates and nest-host * using different flavours of named nested types * @run main TestPrivateStaticField */ public class TestPrivateStaticField { - // Private static field of nest-top for nestmates to access + // Private static field of nest-host for nestmates to access private static int priv_field; // public constructor so we aren't relying on private access --- old/test/hotspot/jtreg/runtime/Nestmates/privateStaticFields/TestReflection.java 2017-10-13 02:05:21.338240103 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateStaticFields/TestReflection.java 2017-10-13 02:05:19.726147844 -0400 @@ -24,7 +24,7 @@ /* * @test * @bug 8046171 - * @summary Test access to private static fields between nestmates and nest-top + * @summary Test access to private static fields between nestmates and nest-host * using different flavours of named nested types using core reflection * @run main TestReflection */ @@ -33,7 +33,7 @@ public class TestReflection { - // private static field of nest-top for nestmates to access + // private static field of nest-host for nestmates to access private static int priv_field; // public constructor so we aren't relying on private access --- old/test/hotspot/jtreg/runtime/Nestmates/privateStaticMethods/TestInvokeStatic.java 2017-10-13 02:05:26.290523518 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateStaticMethods/TestInvokeStatic.java 2017-10-13 02:05:24.658430114 -0400 @@ -24,14 +24,14 @@ /* * @test * @bug 8046171 - * @summary Test access to private static methods between nestmates and nest-top + * @summary Test access to private static methods between nestmates and nest-host * using different flavours of named nested types * @run main TestInvokeStatic */ public class TestInvokeStatic { - // Private static method of nest-top for nestmates to access + // Private static method of nest-host for nestmates to access private static void priv_static_invoke() { System.out.println("TestInvokeStatic::priv_static_invoke"); } --- old/test/hotspot/jtreg/runtime/Nestmates/privateStaticMethods/TestMethodHandles.java 2017-10-13 02:05:30.830783352 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateStaticMethods/TestMethodHandles.java 2017-10-13 02:05:29.138686515 -0400 @@ -24,7 +24,7 @@ /* * @test * @bug 8046171 - * @summary Test access to private static methods between nestmates and nest-top + * @summary Test access to private static methods between nestmates and nest-host * using different flavours of named nested types using MethodHandles * @run main TestMethodHandles */ @@ -38,7 +38,7 @@ static final MethodType INVOKE_T = MethodType.methodType(void.class); - // Private static method of nest-top for nestmates to access + // Private static method of nest-host for nestmates to access private static void priv_static_invoke() { System.out.println("TestMethodHandles::priv_static_invoke"); } --- old/test/hotspot/jtreg/runtime/Nestmates/privateStaticMethods/TestReflection.java 2017-10-13 02:05:35.451047764 -0400 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateStaticMethods/TestReflection.java 2017-10-13 02:05:33.758950928 -0400 @@ -24,7 +24,7 @@ /* * @test * @bug 8046171 - * @summary Test access to private static methods between nestmates and nest-top + * @summary Test access to private static methods between nestmates and nest-host * using different flavours of named nested types using core reflection * @run main TestReflection * @run main/othervm -Dsun.reflect.noInflation=true TestReflection @@ -38,7 +38,7 @@ public class TestReflection { - // Private method of nest-top for nestmates to access + // Private method of nest-host for nestmates to access private static void priv_static_invoke() { System.out.println("TestReflection::priv_static_invoke"); } --- old/test/langtools/lib/annotations/annotations/classfile/ClassfileInspector.java 2017-10-13 02:05:40.223320877 -0400 +++ new/test/langtools/lib/annotations/annotations/classfile/ClassfileInspector.java 2017-10-13 02:05:38.399216485 -0400 @@ -1253,7 +1253,7 @@ } @Override - public Void visitMemberOfNest(MemberOfNest_attribute attr, T p) { + public Void visitNestHost(NestHost_attribute attr, T p) { return null; } --- old/test/langtools/tools/javac/MethodParameters/AttributeVisitor.java 2017-10-13 02:05:44.979593073 -0400 +++ new/test/langtools/tools/javac/MethodParameters/AttributeVisitor.java 2017-10-13 02:05:43.259494633 -0400 @@ -42,7 +42,7 @@ public R visitLineNumberTable(LineNumberTable_attribute attr, P p) { return null; } public R visitLocalVariableTable(LocalVariableTable_attribute attr, P p) { return null; } public R visitLocalVariableTypeTable(LocalVariableTypeTable_attribute attr, P p) { return null; } - public R visitMemberOfNest(MemberOfNest_attribute attr, P p) { return null; } + public R visitNestHost(NestHost_attribute attr, P p) { return null; } public R visitMethodParameters(MethodParameters_attribute attr, P p) { return null; } public R visitModule(Module_attribute attr, P p) { return null; } public R visitModuleHashes(ModuleHashes_attribute attr, P p) { return null; } --- old/test/langtools/tools/javac/valhalla/nestmate/CheckNestmateAttrs.java 2017-10-13 02:05:49.531853593 -0400 +++ new/test/langtools/tools/javac/valhalla/nestmate/CheckNestmateAttrs.java 2017-10-13 02:05:47.819755611 -0400 @@ -24,7 +24,6 @@ /* * @test * @summary Smoke test for nestmate classfile support - * @compile -XDdisableAccessors CheckNestmateAttrs.java * @run main CheckNestmateAttrs * @modules * jdk.compiler @@ -75,24 +74,24 @@ Paths.get(System.getProperty("test.classes"), "CheckNestmateAttrs$Inner.class").toString() }; - runCheck(params, new String [] { "MemberOfNest: class CheckNestmateAttrs" }); + runCheck(params, new String [] { "NestHost: class CheckNestmateAttrs" }); params = new String [] { "-v", Paths.get(System.getProperty("test.classes"), "CheckNestmateAttrs$Nested.class").toString() }; - runCheck(params, new String [] { "MemberOfNest: class CheckNestmateAttrs" }); + runCheck(params, new String [] { "NestHost: class CheckNestmateAttrs" }); params = new String [] { "-v", Paths.get(System.getProperty("test.classes"), "CheckNestmateAttrs$Inner$1LocalInner.class").toString() }; runCheck(params, new String [] { - "MemberOfNest: class CheckNestmateAttrs", + "NestHost: class CheckNestmateAttrs", "0: aload_0", "1: getfield #1 // Field this$1:LCheckNestmateAttrs$Inner;", "4: getfield #3 // Field CheckNestmateAttrs$Inner.this$0:LCheckNestmateAttrs;", - "7: invokespecial #4 // Method CheckNestmateAttrs.test:()V", + "7: invokevirtual #4 // Method CheckNestmateAttrs.test:()V", "10: return" }); @@ -100,7 +99,7 @@ Paths.get(System.getProperty("test.classes"), "CheckNestmateAttrs$Nested$1LocalNested.class").toString() }; - runCheck(params, new String [] { "MemberOfNest: class CheckNestmateAttrs" }); + runCheck(params, new String [] { "NestHost: class CheckNestmateAttrs" }); } void runCheck(String [] params, String [] expectedOut) { --- old/src/jdk.jdeps/share/classes/com/sun/tools/classfile/MemberOfNest_attribute.java 2017-10-13 02:05:55.720207741 -0400 +++ /dev/null 2016-12-30 14:52:30.584485998 -0500 @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.tools.classfile; - -import com.sun.tools.classfile.ConstantPool.CONSTANT_Class_info; - -import java.io.IOException; - -/** - *

This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. - */ -public class MemberOfNest_attribute extends Attribute { - MemberOfNest_attribute(ClassReader cr, int name_index, int length) throws IOException { - super(name_index, length); - top_index = cr.readUnsignedShort(); - } - - public MemberOfNest_attribute(ConstantPool constant_pool, int signature_index) - throws ConstantPoolException { - this(constant_pool.getUTF8Index(Attribute.Signature), signature_index); - } - - public MemberOfNest_attribute(int name_index, int top_index) { - super(name_index, 2); - this.top_index = top_index; - } - - public CONSTANT_Class_info getNestTop(ConstantPool constant_pool) throws ConstantPoolException { - return constant_pool.getClassInfo(top_index); - } - - public R accept(Visitor visitor, D data) { - return visitor.visitMemberOfNest(this, data); - } - - public final int top_index; -} --- /dev/null 2016-12-30 14:52:30.584485998 -0500 +++ new/src/jdk.jdeps/share/classes/com/sun/tools/classfile/NestHost_attribute.java 2017-10-13 02:05:52.428019337 -0400 @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.tools.classfile; + +import com.sun.tools.classfile.ConstantPool.CONSTANT_Class_info; + +import java.io.IOException; + +/** + *

This is NOT part of any supported API. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. + */ +public class NestHost_attribute extends Attribute { + NestHost_attribute(ClassReader cr, int name_index, int length) throws IOException { + super(name_index, length); + top_index = cr.readUnsignedShort(); + } + + public NestHost_attribute(ConstantPool constant_pool, int signature_index) + throws ConstantPoolException { + this(constant_pool.getUTF8Index(Attribute.Signature), signature_index); + } + + public NestHost_attribute(int name_index, int top_index) { + super(name_index, 2); + this.top_index = top_index; + } + + public CONSTANT_Class_info getNestTop(ConstantPool constant_pool) throws ConstantPoolException { + return constant_pool.getClassInfo(top_index); + } + + public R accept(Visitor visitor, D data) { + return visitor.visitNestHost(this, data); + } + + public final int top_index; +} --- old/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/BadNestTop.jcod 2017-10-13 02:06:03.288640877 -0400 +++ /dev/null 2016-12-30 14:52:30.584485998 -0500 @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* Source: NestmateAttributeHolder.java - -public class NestmateAttributeHolder { - public static class TwoMemberOfNest { - } -} -*/ - -// MemberOfNest attribute does not refer to a class - -class NestmateAttributeHolder$BadNestTop { - 0xCAFEBABE; - 0; // minor version - 53; // version - [] { // Constant Pool - ; // first element is empty - Method #3 #12; // #1 - class #13; // #2 - class #16; // #3 - Utf8 ""; // #4 - Utf8 "()V"; // #5 - Utf8 "Code"; // #6 - Utf8 "LineNumberTable"; // #7 - Utf8 "SourceFile"; // #8 - Utf8 "NestmateAttributeHolder.java"; // #9 - Utf8 "MemberOfNest"; // #10 - class #17; // #11 - NameAndType #4 #5; // #12 - Utf8 "NestmateAttributeHolder$BadNestTop"; // #13 - Utf8 "BadNestTop"; // #14 - Utf8 "InnerClasses"; // #15 - Utf8 "java/lang/Object"; // #16 - Utf8 "NestmateAttributeHolder"; // #17 - } // Constant Pool - - 0x0021; // access - #2;// this_cpx - #3;// super_cpx - - [] { // Interfaces - } // Interfaces - - [] { // fields - } // fields - - [] { // methods - { // Member - 0x0001; // access - #4; // name_cpx - #5; // sig_cpx - [] { // Attributes - Attr(#6) { // Code - 1; // max_stack - 1; // max_locals - Bytes[]{ - 0x2AB70001B1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#7) { // LineNumberTable - [] { // LineNumberTable - 0 2; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - } // methods - - [] { // Attributes - Attr(#8) { // SourceFile - #9; - } // end SourceFile - ; - Attr(#10) { // MemberOfNest - 0x000A; // not a class index - } // end MemberOfNest - ; - Attr(#15) { // InnerClasses - [] { // InnerClasses - #2 #11 #14 9; - } - } // end InnerClasses - } // Attributes -} // end class NestmateAttributeHolder$BadNestTop --- /dev/null 2016-12-30 14:52:30.584485998 -0500 +++ new/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/BadNestHost.jcod 2017-10-13 02:05:58.660376003 -0400 @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* Source: NestmateAttributeHolder.java + +public class NestmateAttributeHolder { + public static class TwoNestHost { + } +} +*/ + +// NestHost attribute does not refer to a class + +class NestmateAttributeHolder$BadNestHost { + 0xCAFEBABE; + 0; // minor version + 53; // version + [] { // Constant Pool + ; // first element is empty + Method #3 #12; // #1 + class #13; // #2 + class #16; // #3 + Utf8 ""; // #4 + Utf8 "()V"; // #5 + Utf8 "Code"; // #6 + Utf8 "LineNumberTable"; // #7 + Utf8 "SourceFile"; // #8 + Utf8 "NestmateAttributeHolder.java"; // #9 + Utf8 "NestHost"; // #10 + class #17; // #11 + NameAndType #4 #5; // #12 + Utf8 "NestmateAttributeHolder$BadNestHost"; // #13 + Utf8 "BadNestHost"; // #14 + Utf8 "InnerClasses"; // #15 + Utf8 "java/lang/Object"; // #16 + Utf8 "NestmateAttributeHolder"; // #17 + } // Constant Pool + + 0x0021; // access + #2;// this_cpx + #3;// super_cpx + + [] { // Interfaces + } // Interfaces + + [] { // fields + } // fields + + [] { // methods + { // Member + 0x0001; // access + #4; // name_cpx + #5; // sig_cpx + [] { // Attributes + Attr(#6) { // Code + 1; // max_stack + 1; // max_locals + Bytes[]{ + 0x2AB70001B1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#7) { // LineNumberTable + [] { // LineNumberTable + 0 2; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [] { // Attributes + Attr(#8) { // SourceFile + #9; + } // end SourceFile + ; + Attr(#10) { // NestHost + 0x000A; // not a class index + } // end NestHost + ; + Attr(#15) { // InnerClasses + [] { // InnerClasses + #2 #11 #14 9; + } + } // end InnerClasses + } // Attributes +} // end class NestmateAttributeHolder$BadNestHost --- old/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/ConflictingAttributesInNestTop.jcod 2017-10-13 02:06:09.096973277 -0400 +++ /dev/null 2016-12-30 14:52:30.584485998 -0500 @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* Source: NestmateAttributeHolder.java - -public class NestmateAttributeHolder { - public static class TwoMemberOfNest { - } -} -*/ - -// Add MemberOfNest attribute to nest top class - conflicting attributes - -class ConflictingAttributesInNestTop { - 0xCAFEBABE; - 0; // minor version - 53; // version - [] { // Constant Pool - ; // first element is empty - Method #3 #14; // #1 - class #15; // #2 - class #16; // #3 - class #17; // #4 - Utf8 "TwoMemberOfNest"; // #5 - Utf8 "InnerClasses"; // #6 - Utf8 ""; // #7 - Utf8 "()V"; // #8 - Utf8 "Code"; // #9 - Utf8 "LineNumberTable"; // #10 - Utf8 "SourceFile"; // #11 - Utf8 "ConflictingAttributesInNestTop.java"; // #12 - Utf8 "NestMembers"; // #13 - NameAndType #7 #8; // #14 - Utf8 "ConflictingAttributesInNestTop"; // #15 - Utf8 "java/lang/Object"; // #16 - Utf8 "ConflictingAttributesInNestTop$TwoMemberOfNest"; // #17 - Utf8 "MemberOfNest"; // #18 - } // Constant Pool - - 0x0021; // access - #2;// this_cpx - #3;// super_cpx - - [] { // Interfaces - } // Interfaces - - [] { // fields - } // fields - - [] { // methods - { // Member - 0x0001; // access - #7; // name_cpx - #8; // sig_cpx - [] { // Attributes - Attr(#9) { // Code - 1; // max_stack - 1; // max_locals - Bytes[]{ - 0x2AB70001B1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#10) { // LineNumberTable - [] { // LineNumberTable - 0 1; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - } // methods - - [] { // Attributes - Attr(#11) { // SourceFile - #12; - } // end SourceFile - ; - Attr(#13) { // NestMembers - 0x00010004; - } // end NestMembers - ; - // conflict - can't be a member of a nest and have nest members - Attr(#18) { // MemberOfNest - 0x0003; // #3 is Object - } // end MemberOfNest - ; - Attr(#6) { // InnerClasses - [] { // InnerClasses - #4 #2 #5 9; - } - } // end InnerClasses - } // Attributes -} // end class ConflictingAttributesInNestTop --- /dev/null 2016-12-30 14:52:30.584485998 -0500 +++ new/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/ConflictingAttributesInNestHost.jcod 2017-10-13 02:06:06.144804328 -0400 @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* Source: NestmateAttributeHolder.java + +public class NestmateAttributeHolder { + public static class TwoNestHost { + } +} +*/ + +// Add NestHost attribute to nest-host class - conflicting attributes + +class ConflictingAttributesInNestHost { + 0xCAFEBABE; + 0; // minor version + 53; // version + [] { // Constant Pool + ; // first element is empty + Method #3 #14; // #1 + class #15; // #2 + class #16; // #3 + class #17; // #4 + Utf8 "TwoNestHost"; // #5 + Utf8 "InnerClasses"; // #6 + Utf8 ""; // #7 + Utf8 "()V"; // #8 + Utf8 "Code"; // #9 + Utf8 "LineNumberTable"; // #10 + Utf8 "SourceFile"; // #11 + Utf8 "ConflictingAttributesInNestHost.java"; // #12 + Utf8 "NestMembers"; // #13 + NameAndType #7 #8; // #14 + Utf8 "ConflictingAttributesInNestHost"; // #15 + Utf8 "java/lang/Object"; // #16 + Utf8 "ConflictingAttributesInNestHost$TwoNestHost"; // #17 + Utf8 "NestHost"; // #18 + } // Constant Pool + + 0x0021; // access + #2;// this_cpx + #3;// super_cpx + + [] { // Interfaces + } // Interfaces + + [] { // fields + } // fields + + [] { // methods + { // Member + 0x0001; // access + #7; // name_cpx + #8; // sig_cpx + [] { // Attributes + Attr(#9) { // Code + 1; // max_stack + 1; // max_locals + Bytes[]{ + 0x2AB70001B1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#10) { // LineNumberTable + [] { // LineNumberTable + 0 1; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [] { // Attributes + Attr(#11) { // SourceFile + #12; + } // end SourceFile + ; + Attr(#13) { // NestMembers + 0x00010004; + } // end NestMembers + ; + // conflict - can't be a member of a nest and have nest members + Attr(#18) { // NestHost + 0x0003; // #3 is Object + } // end NestHost + ; + Attr(#6) { // InnerClasses + [] { // InnerClasses + #4 #2 #5 9; + } + } // end InnerClasses + } // Attributes +} // end class ConflictingAttributesInNestHost --- old/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/TwoMemberOfNest.jcod 2017-10-13 02:06:15.149319646 -0400 +++ /dev/null 2016-12-30 14:52:30.584485998 -0500 @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* Source: NestmateAttributeHolder.java - -public class NestmateAttributeHolder { - public static class TwoMemberOfNest { - } -} -*/ - -// Add second MemberOfNest attribute - should fail parsing -class NestmateAttributeHolder$TwoMemberOfNest { - 0xCAFEBABE; - 0; // minor version - 53; // version - [] { // Constant Pool - ; // first element is empty - Method #3 #12; // #1 - class #13; // #2 - class #16; // #3 - Utf8 ""; // #4 - Utf8 "()V"; // #5 - Utf8 "Code"; // #6 - Utf8 "LineNumberTable"; // #7 - Utf8 "SourceFile"; // #8 - Utf8 "NestmateAttributeHolder.java"; // #9 - Utf8 "MemberOfNest"; // #10 - class #17; // #11 - NameAndType #4 #5; // #12 - Utf8 "NestmateAttributeHolder$TwoMemberOfNest"; // #13 - Utf8 "TwoMemberOfNest"; // #14 - Utf8 "InnerClasses"; // #15 - Utf8 "java/lang/Object"; // #16 - Utf8 "NestmateAttributeHolder"; // #17 - } // Constant Pool - - 0x0021; // access - #2;// this_cpx - #3;// super_cpx - - [] { // Interfaces - } // Interfaces - - [] { // fields - } // fields - - [] { // methods - { // Member - 0x0001; // access - #4; // name_cpx - #5; // sig_cpx - [] { // Attributes - Attr(#6) { // Code - 1; // max_stack - 1; // max_locals - Bytes[]{ - 0x2AB70001B1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#7) { // LineNumberTable - [] { // LineNumberTable - 0 2; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - } // methods - - [] { // Attributes - Attr(#8) { // SourceFile - #9; - } // end SourceFile - ; - Attr(#10) { // MemberOfNest - 0x000B; - } // end MemberOfNest - ; - Attr(#10) { // MemberOfNest - 0x000B; - } // end MemberOfNest - ; - Attr(#15) { // InnerClasses - [] { // InnerClasses - #2 #11 #14 9; - } - } // end InnerClasses - } // Attributes -} // end class NestmateAttributeHolder$TwoMemberOfNest --- /dev/null 2016-12-30 14:52:30.584485998 -0500 +++ new/test/hotspot/jtreg/runtime/Nestmates/classFileParsing/TwoNestHost.jcod 2017-10-13 02:06:12.045141999 -0400 @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* Source: NestmateAttributeHolder.java + +public class NestmateAttributeHolder { + public static class TwoNestHost { + } +} +*/ + +// Add second NestHost attribute - should fail parsing +class NestmateAttributeHolder$TwoNestHost { + 0xCAFEBABE; + 0; // minor version + 53; // version + [] { // Constant Pool + ; // first element is empty + Method #3 #12; // #1 + class #13; // #2 + class #16; // #3 + Utf8 ""; // #4 + Utf8 "()V"; // #5 + Utf8 "Code"; // #6 + Utf8 "LineNumberTable"; // #7 + Utf8 "SourceFile"; // #8 + Utf8 "NestmateAttributeHolder.java"; // #9 + Utf8 "NestHost"; // #10 + class #17; // #11 + NameAndType #4 #5; // #12 + Utf8 "NestmateAttributeHolder$TwoNestHost"; // #13 + Utf8 "TwoNestHost"; // #14 + Utf8 "InnerClasses"; // #15 + Utf8 "java/lang/Object"; // #16 + Utf8 "NestmateAttributeHolder"; // #17 + } // Constant Pool + + 0x0021; // access + #2;// this_cpx + #3;// super_cpx + + [] { // Interfaces + } // Interfaces + + [] { // fields + } // fields + + [] { // methods + { // Member + 0x0001; // access + #4; // name_cpx + #5; // sig_cpx + [] { // Attributes + Attr(#6) { // Code + 1; // max_stack + 1; // max_locals + Bytes[]{ + 0x2AB70001B1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#7) { // LineNumberTable + [] { // LineNumberTable + 0 2; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [] { // Attributes + Attr(#8) { // SourceFile + #9; + } // end SourceFile + ; + Attr(#10) { // NestHost + 0x000B; + } // end NestHost + ; + Attr(#10) { // NestHost + 0x000B; + } // end NestHost + ; + Attr(#15) { // InnerClasses + [] { // InnerClasses + #2 #11 #14 9; + } + } // end InnerClasses + } // Attributes +} // end class NestmateAttributeHolder$TwoNestHost --- old/test/hotspot/jtreg/runtime/Nestmates/membership/ArrayNestTop.jcod 2017-10-13 02:06:21.077658915 -0400 +++ /dev/null 2016-12-30 14:52:30.584485998 -0500 @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* Generated from: TestNestmateMembership.java - - MemberOfNest attribute is modified to refer to non-instance class Object[] -*/ - -class TestNestmateMembership$ArrayNestTop { - 0xCAFEBABE; - 0; // minor version - 53; // version - [] { // Constant Pool - ; // first element is empty - Method #6 #18; // #1 - Field #19 #20; // #2 - String #21; // #3 - Method #22 #23; // #4 - class #24; // #5 - class #27; // #6 - Utf8 "oa"; // #7 - Utf8 "[Ljava/lang/Object;"; // #8 - Utf8 ""; // #9 - Utf8 "()V"; // #10 - Utf8 "Code"; // #11 - Utf8 "LineNumberTable"; // #12 - Utf8 "m"; // #13 - Utf8 "SourceFile"; // #14 - Utf8 "TestNestmateMembership.java"; // #15 - Utf8 "MemberOfNest"; // #16 - class #28; // #17 - NameAndType #9 #10; // #18 - class #29; // #19 - NameAndType #30 #31; // #20 - Utf8 "ArrayTop.m() - jcod version"; // #21 - modified - class #32; // #22 - NameAndType #33 #34; // #23 - Utf8 "TestNestmateMembership$ArrayNestTop"; // #24 - Utf8 "ArrayNestTop"; // #25 - Utf8 "InnerClasses"; // #26 - Utf8 "java/lang/Object"; // #27 - Utf8 "TestNestmateMembership"; // #28 - Utf8 "java/lang/System"; // #29 - Utf8 "out"; // #30 - Utf8 "Ljava/io/PrintStream;"; // #31 - Utf8 "java/io/PrintStream"; // #32 - Utf8 "println"; // #33 - Utf8 "(Ljava/lang/String;)V"; // #34 - // Added - class #8; // #35 - } // Constant Pool - - 0x0020; // access - #5;// this_cpx - #6;// super_cpx - - [] { // Interfaces - } // Interfaces - - [] { // fields - { // Member - 0x0000; // access - #7; // name_cpx - #8; // sig_cpx - [] { // Attributes - } // Attributes - } // Member - } // fields - - [] { // methods - { // Member - 0x0000; // access - #9; // name_cpx - #10; // sig_cpx - [] { // Attributes - Attr(#11) { // Code - 1; // max_stack - 1; // max_locals - Bytes[]{ - 0x2AB70001B1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#12) { // LineNumberTable - [] { // LineNumberTable - 0 60; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - ; - { // Member - 0x000A; // access - #13; // name_cpx - #10; // sig_cpx - [] { // Attributes - Attr(#11) { // Code - 2; // max_stack - 0; // max_locals - Bytes[]{ - 0xB200021203B60004; - 0xB1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#12) { // LineNumberTable - [] { // LineNumberTable - 0 63; - 8 64; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - } // methods - - [] { // Attributes - Attr(#14) { // SourceFile - #15; - } // end SourceFile - ; - Attr(#16) { // MemberOfNest - modified - 0x0023; - } // end MemberOfNest - ; - Attr(#26) { // InnerClasses - [] { // InnerClasses - #5 #17 #25 8; - } - } // end InnerClasses - } // Attributes -} // end class TestNestmateMembership$ArrayNestTop --- /dev/null 2016-12-30 14:52:30.584485998 -0500 +++ new/test/hotspot/jtreg/runtime/Nestmates/membership/ArrayNestHost.jcod 2017-10-13 02:06:18.013483558 -0400 @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* Generated from: TestNestmateMembership.java + + NestHost attribute is modified to refer to non-instance class Object[] +*/ + +class TestNestmateMembership$ArrayNestHost { + 0xCAFEBABE; + 0; // minor version + 53; // version + [] { // Constant Pool + ; // first element is empty + Method #6 #18; // #1 + Field #19 #20; // #2 + String #21; // #3 + Method #22 #23; // #4 + class #24; // #5 + class #27; // #6 + Utf8 "oa"; // #7 + Utf8 "[Ljava/lang/Object;"; // #8 + Utf8 ""; // #9 + Utf8 "()V"; // #10 + Utf8 "Code"; // #11 + Utf8 "LineNumberTable"; // #12 + Utf8 "m"; // #13 + Utf8 "SourceFile"; // #14 + Utf8 "TestNestmateMembership.java"; // #15 + Utf8 "NestHost"; // #16 + class #28; // #17 + NameAndType #9 #10; // #18 + class #29; // #19 + NameAndType #30 #31; // #20 + Utf8 "ArrayNestHost.m() - jcod version"; // #21 - modified + class #32; // #22 + NameAndType #33 #34; // #23 + Utf8 "TestNestmateMembership$ArrayNestHost"; // #24 + Utf8 "ArrayNestHost"; // #25 + Utf8 "InnerClasses"; // #26 + Utf8 "java/lang/Object"; // #27 + Utf8 "TestNestmateMembership"; // #28 + Utf8 "java/lang/System"; // #29 + Utf8 "out"; // #30 + Utf8 "Ljava/io/PrintStream;"; // #31 + Utf8 "java/io/PrintStream"; // #32 + Utf8 "println"; // #33 + Utf8 "(Ljava/lang/String;)V"; // #34 + // Added + class #8; // #35 + } // Constant Pool + + 0x0020; // access + #5;// this_cpx + #6;// super_cpx + + [] { // Interfaces + } // Interfaces + + [] { // fields + { // Member + 0x0000; // access + #7; // name_cpx + #8; // sig_cpx + [] { // Attributes + } // Attributes + } // Member + } // fields + + [] { // methods + { // Member + 0x0000; // access + #9; // name_cpx + #10; // sig_cpx + [] { // Attributes + Attr(#11) { // Code + 1; // max_stack + 1; // max_locals + Bytes[]{ + 0x2AB70001B1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#12) { // LineNumberTable + [] { // LineNumberTable + 0 60; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member + 0x000A; // access + #13; // name_cpx + #10; // sig_cpx + [] { // Attributes + Attr(#11) { // Code + 2; // max_stack + 0; // max_locals + Bytes[]{ + 0xB200021203B60004; + 0xB1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#12) { // LineNumberTable + [] { // LineNumberTable + 0 63; + 8 64; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [] { // Attributes + Attr(#14) { // SourceFile + #15; + } // end SourceFile + ; + Attr(#16) { // NestHost - modified + 0x0023; + } // end NestHost + ; + Attr(#26) { // InnerClasses + [] { // InnerClasses + #5 #17 #25 8; + } + } // end InnerClasses + } // Attributes +} // end class TestNestmateMembership$ArrayNestHost --- old/test/hotspot/jtreg/runtime/Nestmates/membership/MissingNestTop.jcod 2017-10-13 02:06:26.913992920 -0400 +++ /dev/null 2016-12-30 14:52:30.584485998 -0500 @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* Generated from: TestNestmateMembership.java - - MemberOfNest attribute is modified to refer to NoSuchClass -*/ - -class TestNestmateMembership$MissingNestTop { - 0xCAFEBABE; - 0; // minor version - 53; // version - [] { // Constant Pool - ; // first element is empty - Method #6 #16; // #1 - Field #17 #18; // #2 - String #19; // #3 - Method #20 #21; // #4 - class #22; // #5 - class #25; // #6 - Utf8 ""; // #7 - Utf8 "()V"; // #8 - Utf8 "Code"; // #9 - Utf8 "LineNumberTable"; // #10 - Utf8 "m"; // #11 - Utf8 "SourceFile"; // #12 - Utf8 "TestNestmateMembership.java"; // #13 - Utf8 "MemberOfNest"; // #14 - class #26; // #15 - NameAndType #7 #8; // #16 - class #27; // #17 - NameAndType #28 #29; // #18 - Utf8 "MissingNestTop.m() - jcod version"; // #19 - modified - class #30; // #20 - NameAndType #31 #32; // #21 - Utf8 "TestNestmateMembership$MissingNestTop"; // #22 - Utf8 "MissingNestTop"; // #23 - Utf8 "InnerClasses"; // #24 - Utf8 "java/lang/Object"; // #25 - Utf8 "TestNestmateMembership"; // #26 - Utf8 "java/lang/System"; // #27 - Utf8 "out"; // #28 - Utf8 "Ljava/io/PrintStream;"; // #29 - Utf8 "java/io/PrintStream"; // #30 - Utf8 "println"; // #31 - Utf8 "(Ljava/lang/String;)V"; // #32 - // added - Utf8 "NoSuchClass"; // 33 - class #33; // #34 - } // Constant Pool - - 0x0020; // access - #5;// this_cpx - #6;// super_cpx - - [] { // Interfaces - } // Interfaces - - [] { // fields - } // fields - - [] { // methods - { // Member - 0x0000; // access - #7; // name_cpx - #8; // sig_cpx - [] { // Attributes - Attr(#9) { // Code - 1; // max_stack - 1; // max_locals - Bytes[]{ - 0x2AB70001B1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#10) { // LineNumberTable - [] { // LineNumberTable - 0 52; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - ; - { // Member - 0x000A; // access - #11; // name_cpx - #8; // sig_cpx - [] { // Attributes - Attr(#9) { // Code - 2; // max_stack - 0; // max_locals - Bytes[]{ - 0xB200021203B60004; - 0xB1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#10) { // LineNumberTable - [] { // LineNumberTable - 0 54; - 8 55; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - } // methods - - [] { // Attributes - Attr(#12) { // SourceFile - #13; - } // end SourceFile - ; - Attr(#14) { // MemberOfNest - modified - 0x0022; - } // end MemberOfNest - ; - Attr(#24) { // InnerClasses - [] { // InnerClasses - #5 #15 #23 8; - } - } // end InnerClasses - } // Attributes -} // end class TestNestmateMembership$MissingNestTop --- /dev/null 2016-12-30 14:52:30.584485998 -0500 +++ new/test/hotspot/jtreg/runtime/Nestmates/membership/MissingNestHost.jcod 2017-10-13 02:06:23.945823055 -0400 @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* Generated from: TestNestmateMembership.java + + NestHost attribute is modified to refer to NoSuchClass +*/ + +class TestNestmateMembership$MissingNestHost { + 0xCAFEBABE; + 0; // minor version + 53; // version + [] { // Constant Pool + ; // first element is empty + Method #6 #16; // #1 + Field #17 #18; // #2 + String #19; // #3 + Method #20 #21; // #4 + class #22; // #5 + class #25; // #6 + Utf8 ""; // #7 + Utf8 "()V"; // #8 + Utf8 "Code"; // #9 + Utf8 "LineNumberTable"; // #10 + Utf8 "m"; // #11 + Utf8 "SourceFile"; // #12 + Utf8 "TestNestmateMembership.java"; // #13 + Utf8 "NestHost"; // #14 + class #26; // #15 + NameAndType #7 #8; // #16 + class #27; // #17 + NameAndType #28 #29; // #18 + Utf8 "MissingNestHost.m() - jcod version"; // #19 - modified + class #30; // #20 + NameAndType #31 #32; // #21 + Utf8 "TestNestmateMembership$MissingNestHost"; // #22 + Utf8 "MissingNestHost"; // #23 + Utf8 "InnerClasses"; // #24 + Utf8 "java/lang/Object"; // #25 + Utf8 "TestNestmateMembership"; // #26 + Utf8 "java/lang/System"; // #27 + Utf8 "out"; // #28 + Utf8 "Ljava/io/PrintStream;"; // #29 + Utf8 "java/io/PrintStream"; // #30 + Utf8 "println"; // #31 + Utf8 "(Ljava/lang/String;)V"; // #32 + // added + Utf8 "NoSuchClass"; // 33 + class #33; // #34 + } // Constant Pool + + 0x0020; // access + #5;// this_cpx + #6;// super_cpx + + [] { // Interfaces + } // Interfaces + + [] { // fields + } // fields + + [] { // methods + { // Member + 0x0000; // access + #7; // name_cpx + #8; // sig_cpx + [] { // Attributes + Attr(#9) { // Code + 1; // max_stack + 1; // max_locals + Bytes[]{ + 0x2AB70001B1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#10) { // LineNumberTable + [] { // LineNumberTable + 0 52; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member + 0x000A; // access + #11; // name_cpx + #8; // sig_cpx + [] { // Attributes + Attr(#9) { // Code + 2; // max_stack + 0; // max_locals + Bytes[]{ + 0xB200021203B60004; + 0xB1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#10) { // LineNumberTable + [] { // LineNumberTable + 0 54; + 8 55; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [] { // Attributes + Attr(#12) { // SourceFile + #13; + } // end SourceFile + ; + Attr(#14) { // NestHost - modified + 0x0022; + } // end NestHost + ; + Attr(#24) { // InnerClasses + [] { // InnerClasses + #5 #15 #23 8; + } + } // end InnerClasses + } // Attributes +} // end class TestNestmateMembership$MissingNestHost --- old/test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestTop.java 2017-10-13 02:06:32.938337683 -0400 +++ /dev/null 2016-12-30 14:52:30.584485998 -0500 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -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!"); - } - } - - // 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 --- /dev/null 2016-12-30 14:52:30.584485998 -0500 +++ new/test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestHost.java 2017-10-13 02:06:29.946166447 -0400 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +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!"); + } + } + + // 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 --- old/test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestTop.jcod 2017-10-13 02:06:38.838675350 -0400 +++ /dev/null 2016-12-30 14:52:30.584485998 -0500 @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* Generated from: PackagedNestTop.java - - NestMembers attribute is modified to contain P2.PackagedNestTop2.Member -*/ - -class P1/PackagedNestTop { - 0xCAFEBABE; - 0; // minor version - 53; // version - [] { // Constant Pool - ; // first element is empty - Method #4 #16; // #1 - Method #17 #18; // #2 - class #19; // #3 - class #20; // #4 - class #21; // #5 - Utf8 "Member"; // #6 - Utf8 "InnerClasses"; // #7 - Utf8 ""; // #8 - Utf8 "()V"; // #9 - Utf8 "Code"; // #10 - Utf8 "LineNumberTable"; // #11 - Utf8 "doAccess"; // #12 - Utf8 "SourceFile"; // #13 - Utf8 "PackagedNestTop.java"; // #14 - Utf8 "NestMembers"; // #15 - NameAndType #8 #9; // #16 - class #23; // #17 - NameAndType #24 #9; // #18 - Utf8 "P1/PackagedNestTop"; // #19 - Utf8 "java/lang/Object"; // #20 - Utf8 "P1/PackagedNestTop$Member"; // #21 - class #25; // #22 - Utf8 "P2/PackagedNestTop2$Member"; // #23 - Utf8 "m"; // #24 - Utf8 "P2/PackagedNestTop2"; // #25 - } // Constant Pool - - 0x0021; // access - #3;// this_cpx - #4;// super_cpx - - [] { // Interfaces - } // Interfaces - - [] { // fields - } // fields - - [] { // methods - { // Member - 0x0001; // access - #8; // name_cpx - #9; // sig_cpx - [] { // Attributes - Attr(#10) { // Code - 1; // max_stack - 1; // max_locals - Bytes[]{ - 0x2AB70001B1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#11) { // LineNumberTable - [] { // LineNumberTable - 0 31; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - ; - { // Member - 0x0009; // access - #12; // name_cpx - #9; // sig_cpx - [] { // Attributes - Attr(#10) { // Code - 0; // max_stack - 0; // max_locals - Bytes[]{ - 0xB80002B1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#11) { // LineNumberTable - [] { // LineNumberTable - 0 44; - 3 45; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - } // methods - - [] { // Attributes - Attr(#13) { // SourceFile - #14; - } // end SourceFile - ; - Attr(#15) { // NestMembers - modified - 0x00010011; - } // end NestMembers - ; - Attr(#7) { // InnerClasses - [] { // InnerClasses - #5 #3 #6 9; - #17 #22 #6 9; - } - } // end InnerClasses - } // Attributes -} // end class P1/PackagedNestTop --- /dev/null 2016-12-30 14:52:30.584485998 -0500 +++ new/test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestHost.jcod 2017-10-13 02:06:35.814502282 -0400 @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* Generated from: PackagedNestHost.java + + NestMembers attribute is modified to contain P2.PackagedNestHost2.Member +*/ + +class P1/PackagedNestHost { + 0xCAFEBABE; + 0; // minor version + 53; // version + [] { // Constant Pool + ; // first element is empty + Method #4 #16; // #1 + Method #17 #18; // #2 + class #19; // #3 + class #20; // #4 + class #21; // #5 + Utf8 "Member"; // #6 + Utf8 "InnerClasses"; // #7 + Utf8 ""; // #8 + Utf8 "()V"; // #9 + Utf8 "Code"; // #10 + Utf8 "LineNumberTable"; // #11 + Utf8 "doAccess"; // #12 + Utf8 "SourceFile"; // #13 + Utf8 "PackagedNestHost.java"; // #14 + Utf8 "NestMembers"; // #15 + NameAndType #8 #9; // #16 + class #23; // #17 + NameAndType #24 #9; // #18 + Utf8 "P1/PackagedNestHost"; // #19 + Utf8 "java/lang/Object"; // #20 + Utf8 "P1/PackagedNestHost$Member"; // #21 + class #25; // #22 + Utf8 "P2/PackagedNestHost2$Member"; // #23 + Utf8 "m"; // #24 + Utf8 "P2/PackagedNestHost2"; // #25 + } // Constant Pool + + 0x0021; // access + #3;// this_cpx + #4;// super_cpx + + [] { // Interfaces + } // Interfaces + + [] { // fields + } // fields + + [] { // methods + { // Member + 0x0001; // access + #8; // name_cpx + #9; // sig_cpx + [] { // Attributes + Attr(#10) { // Code + 1; // max_stack + 1; // max_locals + Bytes[]{ + 0x2AB70001B1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#11) { // LineNumberTable + [] { // LineNumberTable + 0 31; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member + 0x0009; // access + #12; // name_cpx + #9; // sig_cpx + [] { // Attributes + Attr(#10) { // Code + 0; // max_stack + 0; // max_locals + Bytes[]{ + 0xB80002B1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#11) { // LineNumberTable + [] { // LineNumberTable + 0 44; + 3 45; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [] { // Attributes + Attr(#13) { // SourceFile + #14; + } // end SourceFile + ; + Attr(#15) { // NestMembers - modified + 0x00010011; + } // end NestMembers + ; + Attr(#7) { // InnerClasses + [] { // InnerClasses + #5 #3 #6 9; + #17 #22 #6 9; + } + } // end InnerClasses + } // Attributes +} // end class P1/PackagedNestHost --- old/test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestTop2.java 2017-10-13 02:06:44.671009125 -0400 +++ /dev/null 2016-12-30 14:52:30.584485998 -0500 @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package P2; - -/* - * This is used to produce a jcod file in which we modify the - * MemberOfNest attribute to claim that P2.PackagedNestTop.Member - * is a member of the nest of P1.PackagedNestTop. - */ -public class PackagedNestTop2 { - public static class Member { - // jcod file changes this to private - public static void m() { - System.out.println("You should never see this!"); - } - } -} \ No newline at end of file --- /dev/null 2016-12-30 14:52:30.584485998 -0500 +++ new/test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestHost2.java 2017-10-13 02:06:41.714839948 -0400 @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package P2; + +/* + * This is used to produce a jcod file in which we modify the + * NestHost attribute to claim that P2.PackagedNestHost.Member + * is a member of the nest of P1.PackagedNestHost. + */ +public class PackagedNestHost2 { + public static class Member { + // jcod file changes this to private + public static void m() { + System.out.println("You should never see this!"); + } + } +} \ No newline at end of file --- old/test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestTop2Member.jcod 2017-10-13 02:06:50.499342670 -0400 +++ /dev/null 2016-12-30 14:52:30.584485998 -0500 @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* Generated from: PackagedNestTop2.java - - MemberOfNest attribute is modified to contain P1.PackagedNestTop - m() is declared to be private -*/ - -class P2/PackagedNestTop2$Member { - 0xCAFEBABE; - 0; // minor version - 53; // version - [] { // Constant Pool - ; // first element is empty - Method #6 #16; // #1 - Field #17 #18; // #2 - String #19; // #3 - Method #20 #21; // #4 - class #22; // #5 - class #25; // #6 - Utf8 ""; // #7 - Utf8 "()V"; // #8 - Utf8 "Code"; // #9 - Utf8 "LineNumberTable"; // #10 - Utf8 "m"; // #11 - Utf8 "SourceFile"; // #12 - Utf8 "PackagedNestTop2.java"; // #13 - Utf8 "MemberOfNest"; // #14 - class #26; // #15 - NameAndType #7 #8; // #16 - class #27; // #17 - NameAndType #28 #29; // #18 - Utf8 "You should never see this!"; // #19 - class #30; // #20 - NameAndType #31 #32; // #21 - Utf8 "P2/PackagedNestTop2$Member"; // #22 - Utf8 "Member"; // #23 - Utf8 "InnerClasses"; // #24 - Utf8 "java/lang/Object"; // #25 - Utf8 "P2/PackagedNestTop2"; // #26 - Utf8 "java/lang/System"; // #27 - Utf8 "out"; // #28 - Utf8 "Ljava/io/PrintStream;"; // #29 - Utf8 "java/io/PrintStream"; // #30 - Utf8 "println"; // #31 - Utf8 "(Ljava/lang/String;)V"; // #32 - // added entries - Utf8 "P1/PackagedNestTop"; // #33 - class #33; // #34 - } // Constant Pool - - 0x0021; // access - #5;// this_cpx - #6;// super_cpx - - [] { // Interfaces - } // Interfaces - - [] { // fields - } // fields - - [] { // methods - { // Member - 0x0001; // access - #7; // name_cpx - #8; // sig_cpx - [] { // Attributes - Attr(#9) { // Code - 1; // max_stack - 1; // max_locals - Bytes[]{ - 0x2AB70001B1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#10) { // LineNumberTable - [] { // LineNumberTable - 0 32; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - ; - { // Member - 0x000A; // access- modified - #11; // name_cpx - #8; // sig_cpx - [] { // Attributes - Attr(#9) { // Code - 2; // max_stack - 0; // max_locals - Bytes[]{ - 0xB200021203B60004; - 0xB1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#10) { // LineNumberTable - [] { // LineNumberTable - 0 35; - 8 36; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - } // methods - - [] { // Attributes - Attr(#12) { // SourceFile - #13; - } // end SourceFile - ; - Attr(#14) { // MemberOfNest - modified - 0x0022; - } // end MemberOfNest - ; - Attr(#24) { // InnerClasses - [] { // InnerClasses - #5 #15 #23 9; - } - } // end InnerClasses - } // Attributes -} // end class P2/PackagedNestTop2$Member --- /dev/null 2016-12-30 14:52:30.584485998 -0500 +++ new/test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestHost2Member.jcod 2017-10-13 02:06:47.539173265 -0400 @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* Generated from: PackagedNestHost2.java + + NestHost attribute is modified to contain P1.PackagedNestHost + m() is declared to be private +*/ + +class P2/PackagedNestHost2$Member { + 0xCAFEBABE; + 0; // minor version + 53; // version + [] { // Constant Pool + ; // first element is empty + Method #6 #16; // #1 + Field #17 #18; // #2 + String #19; // #3 + Method #20 #21; // #4 + class #22; // #5 + class #25; // #6 + Utf8 ""; // #7 + Utf8 "()V"; // #8 + Utf8 "Code"; // #9 + Utf8 "LineNumberTable"; // #10 + Utf8 "m"; // #11 + Utf8 "SourceFile"; // #12 + Utf8 "PackagedNestHost2.java"; // #13 + Utf8 "NestHost"; // #14 + class #26; // #15 + NameAndType #7 #8; // #16 + class #27; // #17 + NameAndType #28 #29; // #18 + Utf8 "You should never see this!"; // #19 + class #30; // #20 + NameAndType #31 #32; // #21 + Utf8 "P2/PackagedNestHost2$Member"; // #22 + Utf8 "Member"; // #23 + Utf8 "InnerClasses"; // #24 + Utf8 "java/lang/Object"; // #25 + Utf8 "P2/PackagedNestHost2"; // #26 + Utf8 "java/lang/System"; // #27 + Utf8 "out"; // #28 + Utf8 "Ljava/io/PrintStream;"; // #29 + Utf8 "java/io/PrintStream"; // #30 + Utf8 "println"; // #31 + Utf8 "(Ljava/lang/String;)V"; // #32 + // added entries + Utf8 "P1/PackagedNestHost"; // #33 + class #33; // #34 + } // Constant Pool + + 0x0021; // access + #5;// this_cpx + #6;// super_cpx + + [] { // Interfaces + } // Interfaces + + [] { // fields + } // fields + + [] { // methods + { // Member + 0x0001; // access + #7; // name_cpx + #8; // sig_cpx + [] { // Attributes + Attr(#9) { // Code + 1; // max_stack + 1; // max_locals + Bytes[]{ + 0x2AB70001B1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#10) { // LineNumberTable + [] { // LineNumberTable + 0 32; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member + 0x000A; // access- modified + #11; // name_cpx + #8; // sig_cpx + [] { // Attributes + Attr(#9) { // Code + 2; // max_stack + 0; // max_locals + Bytes[]{ + 0xB200021203B60004; + 0xB1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#10) { // LineNumberTable + [] { // LineNumberTable + 0 35; + 8 36; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [] { // Attributes + Attr(#12) { // SourceFile + #13; + } // end SourceFile + ; + Attr(#14) { // NestHost - modified + 0x0022; + } // end NestHost + ; + Attr(#24) { // InnerClasses + [] { // InnerClasses + #5 #15 #23 9; + } + } // end InnerClasses + } // Attributes +} // end class P2/PackagedNestHost2$Member --- old/test/hotspot/jtreg/runtime/Nestmates/privateMethods/MissingNestTop.jcod 2017-10-13 02:06:56.607692239 -0400 +++ /dev/null 2016-12-30 14:52:30.584485998 -0500 @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -// Generated from the source in TestInvokeErrors.java -// with MemberOfNest referring to non-existent class: NoSuchClass - -class TestInvokeErrors$MissingNestTop { - 0xCAFEBABE; - 0; // minor version - 53; // version - [] { // Constant Pool - ; // first element is empty - Method #6 #16; // #1 - Field #17 #18; // #2 - String #19; // #3 - Method #20 #21; // #4 - class #22; // #5 - class #25; // #6 - Utf8 ""; // #7 - Utf8 "()V"; // #8 - Utf8 "Code"; // #9 - Utf8 "LineNumberTable"; // #10 - Utf8 "priv_invoke"; // #11 - Utf8 "SourceFile"; // #12 - Utf8 "TestInvokeErrors.java"; // #13 - Utf8 "MemberOfNest"; // #14 - class #26; // #15 - NameAndType #7 #8; // #16 - class #27; // #17 - NameAndType #28 #29; // #18 - Utf8 "MissingNestTop::priv_invoke"; // #19 - class #30; // #20 - NameAndType #31 #32; // #21 - Utf8 "TestInvokeErrors$MissingNestTop"; // #22 - Utf8 "MissingNestTop"; // #23 - Utf8 "InnerClasses"; // #24 - Utf8 "java/lang/Object"; // #25 - Utf8 "TestInvokeErrors"; // #26 - Utf8 "java/lang/System"; // #27 - Utf8 "out"; // #28 - Utf8 "Ljava/io/PrintStream;"; // #29 - Utf8 "java/io/PrintStream"; // #30 - Utf8 "println"; // #31 - Utf8 "(Ljava/lang/String;)V"; // #32 - Utf8 "NoSuchClass"; // #33 - added - class #33; // #34 - added - } // Constant Pool - - 0x0020; // access - #5;// this_cpx - #6;// super_cpx - - [] { // Interfaces - } // Interfaces - - [] { // fields - } // fields - - [] { // methods - { // Member - 0x0000; // access - #7; // name_cpx - #8; // sig_cpx - [] { // Attributes - Attr(#9) { // Code - 1; // max_stack - 1; // max_locals - Bytes[]{ - 0x2AB70001B1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#10) { // LineNumberTable - [] { // LineNumberTable - 0 57; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - ; - { // Member - 0x0002; // access - #11; // name_cpx - #8; // sig_cpx - [] { // Attributes - Attr(#9) { // Code - 2; // max_stack - 1; // max_locals - Bytes[]{ - 0xB200021203B60004; - 0xB1; - }; - [] { // Traps - } // end Traps - [] { // Attributes - Attr(#10) { // LineNumberTable - [] { // LineNumberTable - 0 60; - 8 61; - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - } // methods - - [] { // Attributes - Attr(#12) { // SourceFile - #13; - } // end SourceFile - ; - Attr(#14) { // MemberOfNest - 0x0022; // Modified: class #34 -> NoSuchClass - } // end MemberOfNest - ; - Attr(#24) { // InnerClasses - [] { // InnerClasses - #5 #15 #23 8; - } - } // end InnerClasses - } // Attributes -} // end class TestInvokeErrors$MissingNestTop --- /dev/null 2016-12-30 14:52:30.584485998 -0500 +++ new/test/hotspot/jtreg/runtime/Nestmates/privateMethods/MissingNestHost.jcod 2017-10-13 02:06:53.387507955 -0400 @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// Generated from the source in TestInvokeErrors.java +// with NestHost referring to non-existent class: NoSuchClass + +class TestInvokeErrors$MissingNestHost { + 0xCAFEBABE; + 0; // minor version + 53; // version + [] { // Constant Pool + ; // first element is empty + Method #6 #16; // #1 + Field #17 #18; // #2 + String #19; // #3 + Method #20 #21; // #4 + class #22; // #5 + class #25; // #6 + Utf8 ""; // #7 + Utf8 "()V"; // #8 + Utf8 "Code"; // #9 + Utf8 "LineNumberTable"; // #10 + Utf8 "priv_invoke"; // #11 + Utf8 "SourceFile"; // #12 + Utf8 "TestInvokeErrors.java"; // #13 + Utf8 "NestHost"; // #14 + class #26; // #15 + NameAndType #7 #8; // #16 + class #27; // #17 + NameAndType #28 #29; // #18 + Utf8 "MissingNestHost::priv_invoke"; // #19 + class #30; // #20 + NameAndType #31 #32; // #21 + Utf8 "TestInvokeErrors$MissingNestHost"; // #22 + Utf8 "MissingNestHost"; // #23 + Utf8 "InnerClasses"; // #24 + Utf8 "java/lang/Object"; // #25 + Utf8 "TestInvokeErrors"; // #26 + Utf8 "java/lang/System"; // #27 + Utf8 "out"; // #28 + Utf8 "Ljava/io/PrintStream;"; // #29 + Utf8 "java/io/PrintStream"; // #30 + Utf8 "println"; // #31 + Utf8 "(Ljava/lang/String;)V"; // #32 + Utf8 "NoSuchClass"; // #33 - added + class #33; // #34 - added + } // Constant Pool + + 0x0020; // access + #5;// this_cpx + #6;// super_cpx + + [] { // Interfaces + } // Interfaces + + [] { // fields + } // fields + + [] { // methods + { // Member + 0x0000; // access + #7; // name_cpx + #8; // sig_cpx + [] { // Attributes + Attr(#9) { // Code + 1; // max_stack + 1; // max_locals + Bytes[]{ + 0x2AB70001B1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#10) { // LineNumberTable + [] { // LineNumberTable + 0 57; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member + 0x0002; // access + #11; // name_cpx + #8; // sig_cpx + [] { // Attributes + Attr(#9) { // Code + 2; // max_stack + 1; // max_locals + Bytes[]{ + 0xB200021203B60004; + 0xB1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#10) { // LineNumberTable + [] { // LineNumberTable + 0 60; + 8 61; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [] { // Attributes + Attr(#12) { // SourceFile + #13; + } // end SourceFile + ; + Attr(#14) { // NestHost + 0x0022; // Modified: class #34 -> NoSuchClass + } // end NestHost + ; + Attr(#24) { // InnerClasses + [] { // InnerClasses + #5 #15 #23 8; + } + } // end InnerClasses + } // Attributes +} // end class TestInvokeErrors$MissingNestHost