Rename InstanceKlass::has_old_class_version to can_be_verified_at_dumptime

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: 17
    • Component/s: hotspot
    • b24

      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.

            Assignee:
            Calvin Cheung (Inactive)
            Reporter:
            Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: