The implementation of the ClassFileDumper exposed a cycle in the startup that results in ExceptionInInitializer caused by the initialization of the internal OperatingSystem enum.
The early initialization of the OperationSystem enum produces a cascade of MethodHandle initialization that should be deferred.
The file system initialization on the Mac needs to check the OS version number. Currently, by calling OperationSystem.version().
Decoupling the jdk.internal.util.Version class from OperatingSystem allows it to avoid the initialization cycle.
Fixing this allows the ClassFileDumper to use the preferred java.nio.file.Path API.
The early initialization of the OperationSystem enum produces a cascade of MethodHandle initialization that should be deferred.
The file system initialization on the Mac needs to check the OS version number. Currently, by calling OperationSystem.version().
Decoupling the jdk.internal.util.Version class from OperatingSystem allows it to avoid the initialization cycle.
Fixing this allows the ClassFileDumper to use the preferred java.nio.file.Path API.
- relates to
-
JDK-8307944 ClassFileDumper should only load java.nio.file.Path if enabled
- Resolved