< prev index next >

src/hotspot/share/classfile/klassFactory.cpp

Print this page

        

@@ -81,16 +81,21 @@
                                                     ClassFileStream::verify);
       ClassFileParser parser(stream,
                              class_name,
                              loader_data,
                              protection_domain,
-                             NULL,
-                             NULL,
+                             NULL,  // unsafe_anonymous_host
+                             NULL,  // cp_patches
+                             false, // is_nonfindable
+                             false, // can_access_vm_annotations
                              ClassFileParser::BROADCAST, // publicity level
                              CHECK_NULL);
-      InstanceKlass* new_ik = parser.create_instance_klass(true /* changed_by_loadhook */,
+      InstanceKlass* new_ik = parser.create_instance_klass(true, // changed_by_loadhook
+                                                           NULL,  // dynamic_nest_host
+                                                           Handle(), // classData
                                                            CHECK_NULL);
+
       if (cached_class_file != NULL) {
         new_ik->set_cached_class_file(cached_class_file);
       }
 
       if (class_loader.is_null()) {

@@ -167,10 +172,14 @@
                                                 Symbol* name,
                                                 ClassLoaderData* loader_data,
                                                 Handle protection_domain,
                                                 const InstanceKlass* unsafe_anonymous_host,
                                                 GrowableArray<Handle>* cp_patches,
+                                                const bool is_nonfindable,
+                                                const bool can_access_vm_annotations,
+                                                InstanceKlass* dynamic_nest_host,
+                                                Handle classData,
                                                 TRAPS) {
   assert(stream != NULL, "invariant");
   assert(loader_data != NULL, "invariant");
   assert(THREAD->is_Java_thread(), "must be a JavaThread");
 

@@ -182,12 +191,15 @@
   ClassFileStream* old_stream = stream;
 
   // increment counter
   THREAD->statistical_info().incr_define_class_count();
 
-  // Skip this processing for VM anonymous classes
-  if (unsafe_anonymous_host == NULL) {
+  assert(!(is_nonfindable && (unsafe_anonymous_host != NULL)),
+         "nonFindable class has an anonymous host");
+
+  // Skip this processing for VM nonfindable or anonymous classes
+  if (!is_nonfindable && (unsafe_anonymous_host == NULL)) {
     stream = check_class_file_load_hook(stream,
                                         name,
                                         loader_data,
                                         protection_domain,
                                         &cached_class_file,

@@ -198,15 +210,17 @@
                          name,
                          loader_data,
                          protection_domain,
                          unsafe_anonymous_host,
                          cp_patches,
+                         is_nonfindable,
+                         can_access_vm_annotations,
                          ClassFileParser::BROADCAST, // publicity level
                          CHECK_NULL);
 
-  InstanceKlass* result = parser.create_instance_klass(old_stream != stream, CHECK_NULL);
-  assert(result == parser.create_instance_klass(old_stream != stream, THREAD), "invariant");
+  InstanceKlass* result = parser.create_instance_klass(old_stream != stream, dynamic_nest_host, classData, CHECK_NULL);
+  assert(result == parser.create_instance_klass(old_stream != stream, NULL, classData, THREAD), "invariant");
 
   if (result == NULL) {
     return NULL;
   }
 
< prev index next >