< prev index next >

src/hotspot/share/classfile/systemDictionaryShared.cpp

Print this page

        

@@ -849,11 +849,11 @@
                                                           const ClassFileStream* cfs,
                                                           TRAPS) {
   if (!UseSharedSpaces) {
     return NULL;
   }
-  if (class_name == NULL) {  // don't do this for anonymous classes
+  if (class_name == NULL) {  // don't do this for nonfindable and unsafe anonymous classes
     return NULL;
   }
   if (class_loader.is_null() ||
       SystemDictionary::is_system_class_loader(class_loader()) ||
       SystemDictionary::is_platform_class_loader(class_loader())) {

@@ -1006,12 +1006,12 @@
   ResourceMark rm;
   log_warning(cds)("Skipping %s: %s", k->name()->as_C_string(), reason);
 }
 
 bool SystemDictionaryShared::should_be_excluded(InstanceKlass* k) {
-  if (k->class_loader_data()->is_unsafe_anonymous()) {
-    return true; // unsafe anonymous classes are not archived, skip
+  if (k->is_nonfindable()) {
+    return true; // nonfindable and unsafe anonymous classes are not archived, skip
   }
   if (k->is_in_error_state()) {
     return true;
   }
   if (k->shared_classpath_index() < 0 && is_builtin(k)) {
< prev index next >