--- old/src/hotspot/share/classfile/classFileParser.cpp 2019-12-08 12:43:30.994458999 -0800 +++ new/src/hotspot/share/classfile/classFileParser.cpp 2019-12-08 12:43:30.834539000 -0800 @@ -128,6 +128,8 @@ #define JAVA_14_VERSION 58 +#define JAVA_15_VERSION 59 + void ClassFileParser::set_class_bad_constant_seen(short bad_constant) { assert((bad_constant == JVM_CONSTANT_Module || bad_constant == JVM_CONSTANT_Package) && _major_version >= JAVA_9_VERSION, @@ -3477,7 +3479,7 @@ } bool ClassFileParser::supports_records() { - return _major_version == JAVA_14_VERSION && + return _major_version == JAVA_15_VERSION && _minor_version == JAVA_PREVIEW_MINOR_VERSION && Arguments::enable_preview(); } @@ -3704,7 +3706,7 @@ "Nest-host class_info_index %u has bad constant type in class file %s", class_info_index, CHECK); _nest_host = class_info_index; - } else if (_major_version >= JAVA_14_VERSION) { + } else if (_major_version >= JAVA_15_VERSION) { if (tag == vmSymbols::tag_record()) { // Skip over Record attribute if not supported or if super class is // not java.lang.Record. @@ -3722,14 +3724,14 @@ record_attribute_length = attribute_length; } else if (log_is_enabled(Info, class, record)) { // Log why the Record attribute was ignored. Note that if the - // class file version is 58.65535 and --enable-preview wasn't + // class file version is 59.65535 and --enable-preview wasn't // specified then a java.lang.UnsupportedClassVersionError // exception would have been thrown. ResourceMark rm(THREAD); log_info(class, record)("Ignoring Record attribute in class %s because %s", _class_name->as_C_string(), supports_records() ? "super type is not java.lang.Record" : - "class file version is not 58.65535"); + "class file version is not 59.65535"); } cfs->skip_u1(attribute_length, CHECK); } else {