JDK-8249944 : Move and improve the AllStatic class
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-07-23
  • Updated: 2022-01-22
  • Resolved: 2020-07-24
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.
JDK 16
16 b08Fixed
Related Reports
Relates :  
Relates :  
Description
Currently the AllStatic class is defined in allocation.hpp.  As a result, in order to derive from AllStatic one needs to drag in all the rest of the stuff in allocation.hpp, most or all of which is often irrelevant to the code that wants to use AllStatic.  It would be better if it was in some different location that dragged in fewer dependencies.

We can also simplify its definition using C++11, making it fully standalone.  Define it as

{code}
struct AllStatic {
  AllStatic() = deleted;
  ~AllStatic() = deleted;
};
{code}

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/e79f5ef92144 User: kbarrett Date: 2020-07-24 09:04:38 +0000
24-07-2020