< prev index next >

src/hotspot/share/classfile/classFileParser.cpp

Print this page

        

@@ -126,10 +126,12 @@
 
 #define JAVA_13_VERSION                   57
 
 #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,
          "Unexpected bad constant pool entry");
   if (_bad_constant_seen == 0) _bad_constant_seen = bad_constant;

@@ -3475,11 +3477,11 @@
                      "Bad length on BootstrapMethods in class file %s",
                      CHECK);
 }
 
 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();
 }
 
 void ClassFileParser::parse_classfile_attributes(const ClassFileStream* const cfs,

@@ -3702,11 +3704,11 @@
           check_property(
                          valid_klass_reference_at(class_info_index),
                          "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.
             if (supports_records() &&
                 cp->klass_name_at(_super_class_index) == vmSymbols::java_lang_Record()) {

@@ -3720,18 +3722,18 @@
               parsed_record_attribute = true;
               record_attribute_start = cfs->current();
               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 {
             // Unknown attribute
             cfs->skip_u1(attribute_length, CHECK);
< prev index next >