< prev index next >

src/hotspot/share/classfile/classListParser.cpp

Print this page
rev 59383 : [mq]: final


 264       if (c == '\0') {
 265         jio_fprintf(defaultStream::error_stream(), "%s", " ");
 266       } else {
 267         jio_fprintf(defaultStream::error_stream(), "%c", c);
 268       }
 269     }
 270     jio_fprintf(defaultStream::error_stream(), "\n");
 271     for (int i=0; i<error_index; i++) {
 272       jio_fprintf(defaultStream::error_stream(), "%s", " ");
 273     }
 274     jio_fprintf(defaultStream::error_stream(), "^\n");
 275   }
 276 
 277   vm_exit_during_initialization("class list format error.", NULL);
 278   va_end(ap);
 279 }
 280 
 281 // This function is used for loading classes for customized class loaders
 282 // during archive dumping.
 283 InstanceKlass* ClassListParser::load_class_from_source(Symbol* class_name, TRAPS) {
 284 #if !(defined(_LP64) && (defined(LINUX)|| defined(SOLARIS) || defined(__APPLE__)))
 285   // The only supported platforms are: (1) Linux/64-bit and (2) Solaris/64-bit and
 286   // (3) MacOSX/64-bit
 287   // This #if condition should be in sync with the areCustomLoadersSupportedForCDS
 288   // method in test/lib/jdk/test/lib/Platform.java.
 289   error("AppCDS custom class loaders not supported on this platform");
 290 #endif
 291 
 292   if (!is_super_specified()) {
 293     error("If source location is specified, super class must be also specified");
 294   }
 295   if (!is_id_specified()) {
 296     error("If source location is specified, id must be also specified");
 297   }
 298   if (strncmp(_class_name, "java/", 5) == 0) {
 299     log_info(cds)("Prohibited package for non-bootstrap classes: %s.class from %s",
 300           _class_name, _source);
 301     return NULL;
 302   }
 303 
 304   InstanceKlass* k = ClassLoaderExt::load_class(class_name, _source, CHECK_NULL);




 264       if (c == '\0') {
 265         jio_fprintf(defaultStream::error_stream(), "%s", " ");
 266       } else {
 267         jio_fprintf(defaultStream::error_stream(), "%c", c);
 268       }
 269     }
 270     jio_fprintf(defaultStream::error_stream(), "\n");
 271     for (int i=0; i<error_index; i++) {
 272       jio_fprintf(defaultStream::error_stream(), "%s", " ");
 273     }
 274     jio_fprintf(defaultStream::error_stream(), "^\n");
 275   }
 276 
 277   vm_exit_during_initialization("class list format error.", NULL);
 278   va_end(ap);
 279 }
 280 
 281 // This function is used for loading classes for customized class loaders
 282 // during archive dumping.
 283 InstanceKlass* ClassListParser::load_class_from_source(Symbol* class_name, TRAPS) {
 284 #if !(defined(_LP64) && (defined(LINUX) || defined(__APPLE__)))
 285   // The only supported platforms are: (1) Linux/64-bit and (2) Solaris/64-bit and
 286   // (3) MacOSX/64-bit
 287   // This #if condition should be in sync with the areCustomLoadersSupportedForCDS
 288   // method in test/lib/jdk/test/lib/Platform.java.
 289   error("AppCDS custom class loaders not supported on this platform");
 290 #endif
 291 
 292   if (!is_super_specified()) {
 293     error("If source location is specified, super class must be also specified");
 294   }
 295   if (!is_id_specified()) {
 296     error("If source location is specified, id must be also specified");
 297   }
 298   if (strncmp(_class_name, "java/", 5) == 0) {
 299     log_info(cds)("Prohibited package for non-bootstrap classes: %s.class from %s",
 300           _class_name, _source);
 301     return NULL;
 302   }
 303 
 304   InstanceKlass* k = ClassLoaderExt::load_class(class_name, _source, CHECK_NULL);


< prev index next >