Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8158681

ClassLoader::classloader_type() is called from code not included under #if INCLUDE_CDS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • None
    • hotspot
    • None
    • b126

      ClassLoader::classloader_type() is only defined when INCLUDE_CDS is true. It's called from following code in classLoaderExt.hpp, which causes build failure when INCLUDE_CDS is 0.

          instanceKlassHandle record_result(Symbol* class_name,
                                            ClassPathEntry* e,
                                            const s2 classpath_index,
                                            instanceKlassHandle result, TRAPS) {
            if (ClassLoader::add_package(_file_name, classpath_index, THREAD)) {
              if (DumpSharedSpaces) {
                s2 classloader_type = ClassLoader::classloader_type(
                                class_name, e, classpath_index, CHECK_(result));
                result->set_shared_classpath_index(classpath_index);
                result->set_class_loader_type(classloader_type);
              }
              return result;
            } else {
              return instanceKlassHandle(); // NULL
            }
          }
       

            jiangli Jiangli Zhou
            jiangli Jiangli Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: