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

ClassLoaderData::loader_name() should show consistent values

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • None
    • hotspot
    • None

      If unloading, ClassLoaderData::loader_name() will show loader name if set, otherwise loader class name.

      If not unloading, ClassLoaderData::loader_name() will just show the loader class name.

      This should be consistent.

      Also, I would prefer if we had separate accessors to each thing, so:

      ClassloaderData::loader_name()
        - return cached loader name if unloading, otherwise loader_oop->name

      ClassloaderData::loader_class_name()
        - return cached loader class name if unloading, otherwise loader_oop->klass->name

      And then, if even necessary, a compound version of this:
      ClassloaderData::loader_name_and_class_name()
      which outputs something like "<name> (instance of <classname>)".
      to replace the current existing users of the current loader_name().

      The change looks easy but to ensure that no existing caller of ClasslaoderData::loader_name() trips over the changed output may vbe the real problem.






            Unassigned Unassigned
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: