< prev index next >

src/hotspot/share/classfile/classListParser.cpp

Print this page
rev 59103 : imported patch hotspot


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




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


< prev index next >