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

VM_Version should be called instead of Abstract_VM_Version so that overriding works

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b16
    • CPU:
      generic
    • OS:
      generic

      Description

      Abstract_VM_Version is a shared-code class that defines a bunch of static methods.

      VM_Version is an arch-specific subclass of Abstract_VM_Version that can add additional methods as well as _potentially_ override methods from Abstract_VM_Version.

      The problem is that for overriding to work all "client" code should be calling VM_Version::XXX - but they don't! Not only do we have completely inconsistent use of VM_Version vs. Abstract_VM_Version across "clients", but even within the same piece of code! For example in arguments.cpp we first set the system property java.vm.info using VM_Version::vm_info_string() but then we replace it using Abstract_VM_Version::vm_info_string!

      The fix could be as simple as changing all calls of Abstract_VM_Version to VM_Version but we need to verify which methods are being overridden in case there are situations where different clients are invoking differnet versions of the same method.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hseigel Harold Seigel
              Reporter:
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: