JDK-8248433 : Use C++11 forward declared enum to move CollectedHeap::named_heap
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 16
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • Submitted: 2020-06-27
  • Updated: 2020-12-07
  • Resolved: 2020-12-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Blocks :  
Description
JDK-8247740 added CollectedHeap::named_heap, a protected helper function for accessing derived heap objects.  Because it takes the CollectedHeap::Name of the intended collector, for error checking purposes, it had to be declared after the definition of the Name enum.  This resulted in multiple public/protected transitions.  C++11 permits forward declaration of enums, which would permit reordering.

While we're at it, the Name enum should be a scoped enum.