< prev index next >

src/hotspot/share/classfile/classLoader.cpp

Print this page




1385       ++classpath_index;
1386     }
1387   }
1388 
1389   if (NULL == stream) {
1390     return NULL;
1391   }
1392 
1393   stream->set_verify(ClassLoaderExt::should_verify(classpath_index));
1394 
1395   ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
1396   Handle protection_domain;
1397 
1398   InstanceKlass* result = KlassFactory::create_from_stream(stream,
1399                                                            name,
1400                                                            loader_data,
1401                                                            protection_domain,
1402                                                            NULL,  // unsafe_anonymous_host
1403                                                            NULL,  // cp_patches
1404                                                            false, // is_nonfindable

1405                                                            THREAD);
1406   if (HAS_PENDING_EXCEPTION) {
1407     if (DumpSharedSpaces) {
1408       tty->print_cr("Preload Error: Failed to load %s", class_name);
1409     }
1410     return NULL;
1411   }
1412 
1413   if (!add_package(file_name, classpath_index, THREAD)) {
1414     return NULL;
1415   }
1416 
1417   return result;
1418 }
1419 
1420 #if INCLUDE_CDS
1421 char* ClassLoader::skip_uri_protocol(char* source) {
1422   if (strncmp(source, "file:", 5) == 0) {
1423     // file: protocol path could start with file:/ or file:///
1424     // locate the char after all the forward slashes




1385       ++classpath_index;
1386     }
1387   }
1388 
1389   if (NULL == stream) {
1390     return NULL;
1391   }
1392 
1393   stream->set_verify(ClassLoaderExt::should_verify(classpath_index));
1394 
1395   ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
1396   Handle protection_domain;
1397 
1398   InstanceKlass* result = KlassFactory::create_from_stream(stream,
1399                                                            name,
1400                                                            loader_data,
1401                                                            protection_domain,
1402                                                            NULL,  // unsafe_anonymous_host
1403                                                            NULL,  // cp_patches
1404                                                            false, // is_nonfindable
1405                                                            false, // can_access_vm_annotations
1406                                                            THREAD);
1407   if (HAS_PENDING_EXCEPTION) {
1408     if (DumpSharedSpaces) {
1409       tty->print_cr("Preload Error: Failed to load %s", class_name);
1410     }
1411     return NULL;
1412   }
1413 
1414   if (!add_package(file_name, classpath_index, THREAD)) {
1415     return NULL;
1416   }
1417 
1418   return result;
1419 }
1420 
1421 #if INCLUDE_CDS
1422 char* ClassLoader::skip_uri_protocol(char* source) {
1423   if (strncmp(source, "file:", 5) == 0) {
1424     // file: protocol path could start with file:/ or file:///
1425     // locate the char after all the forward slashes


< prev index next >