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

Rename InstanceKlass::has_old_class_version to can_be_verified_at_dumptime

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 17
    • 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.

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

              Created:
              Updated:
              Resolved: