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

Rename InstanceKlass::has_old_class_version to can_be_verified_at_dumptime

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • hotspot
    • b24

    Description

      The name "has_old_class_version" doesn't reflect what the function actually does. See discussions in https://github.com/openjdk/jdk/pull/3983

      // Check if a class or any of its supertypes has a version older than 50.
      // CDS will not perform verification of old classes during dump time because
      // without changing the old verifier, the verification constraint cannot be
      // retrieved during dump time.
      // Verification of archived old classes will be performed during run time.
      bool InstanceKlass::has_old_class_version()

      Trying to describe what the function does in a short and meaningful name is not always possible.

      In this case, I think it's better to say what the function is intended to be used for. InstanceKlass::can_be_verified_at_dumptime() will probably suffice. It's unlikely that this function will be used for any other purpose.

      Attachments

        Issue Links

          Activity

            People

              ccheung Calvin Cheung
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: