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

VirtualSpace::print_on() should be const

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b02

      Description

      VirtualSpace::print_on() and VirtualSpace::print() are not declared as const, leading to weird code like this in epsilonHeap.cpp

      void EpsilonHeap::print_on(outputStream *st) const {
        st->print_cr("Epsilon Heap");

        // Cast away constness:
        ((VirtualSpace)_virtual_space).print_on(st);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              iklam Ioi Lam
              Reporter:
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: