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

Rename SystemDictionary::load_shared_class(Symbol*, Handle, TRAPS) to load_shared_boot_class()

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9, 10, 11
    • Fix Version/s: 12
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b18

      Description

      SystemDictionary::load_shared_class(Symbol*, Handle, TRAPS) is only called by SystemDictionary::load_instance_class() for the NULL loader case.

      To reduce confusion, SystemDictionary::load_shared_class(Symbol*, Handle, TRAPS) should be renamed to SystemDictionary::load_shared_boot_class(). The code can be simplified to remove the loader check. The class loader Handle argument can also be removed.

      -InstanceKlass* SystemDictionary::load_shared_class(
      - Symbol* class_name, Handle class_loader, TRAPS) {
      +InstanceKlass* SystemDictionary::load_shared_boot_class(
      + Symbol* class_name, TRAPS) {
         InstanceKlass* ik = find_shared_class(class_name);
         // Make sure we only return the boot class for the NULL classloader.
      - if (ik != NULL &&
      - ik->is_shared_boot_class() && class_loader.is_null()) {
      + if (ik != NULL && ik->is_shared_boot_class()) {
           Handle protection_domain;
      - return load_shared_class(ik, class_loader, protection_domain, THREAD);
      + return load_shared_class(ik, Handle(), protection_domain, THREAD);
         }
         return NULL;
       }

        Attachments

          Activity

            People

            Assignee:
            jiangli Jiangli Zhou
            Reporter:
            jiangli Jiangli Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: