src/hotspot/share/classfile/classFileParser.cpp
changeset 54595 a61da18408c1
parent 54557 4ff026ff9c98
child 54847 59ea39bb2809
equal deleted inserted replaced
54594:e0516ee47c36 54595:a61da18408c1
   124 #define JAVA_12_VERSION                   56
   124 #define JAVA_12_VERSION                   56
   125 
   125 
   126 #define JAVA_13_VERSION                   57
   126 #define JAVA_13_VERSION                   57
   127 
   127 
   128 void ClassFileParser::set_class_bad_constant_seen(short bad_constant) {
   128 void ClassFileParser::set_class_bad_constant_seen(short bad_constant) {
   129   assert((bad_constant == 19 || bad_constant == 20) && _major_version >= JAVA_9_VERSION,
   129   assert((bad_constant == JVM_CONSTANT_Module ||
       
   130           bad_constant == JVM_CONSTANT_Package) && _major_version >= JAVA_9_VERSION,
   130          "Unexpected bad constant pool entry");
   131          "Unexpected bad constant pool entry");
   131   if (_bad_constant_seen == 0) _bad_constant_seen = bad_constant;
   132   if (_bad_constant_seen == 0) _bad_constant_seen = bad_constant;
   132 }
   133 }
   133 
   134 
   134 void ClassFileParser::parse_constant_pool_entries(const ClassFileStream* const stream,
   135 void ClassFileParser::parse_constant_pool_entries(const ClassFileStream* const stream,
   341         } else {
   342         } else {
   342           cp->symbol_at_put(index, result);
   343           cp->symbol_at_put(index, result);
   343         }
   344         }
   344         break;
   345         break;
   345       }
   346       }
   346       case 19:
   347       case JVM_CONSTANT_Module:
   347       case 20: {
   348       case JVM_CONSTANT_Package: {
   348         // Record that an error occurred in these two cases but keep parsing so
   349         // Record that an error occurred in these two cases but keep parsing so
   349         // that ACC_Module can be checked for in the access_flags.  Need to
   350         // that ACC_Module can be checked for in the access_flags.  Need to
   350         // throw NoClassDefFoundError in that case.
   351         // throw NoClassDefFoundError in that case.
   351         if (_major_version >= JAVA_9_VERSION) {
   352         if (_major_version >= JAVA_9_VERSION) {
   352           cfs->guarantee_more(3, CHECK);
   353           cfs->guarantee_more(3, CHECK);