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.
Attachments
Issue Links
is blocked by
JDK-8208089JEP 347: Enable C++14 Language Features