From 075a73fb2f1e5f90b4e9f861cf852c1e54a3a932 Mon Sep 17 00:00:00 2001 From: mduigou Date: Thu, 1 Mar 2012 09:40:18 -0800 Subject: [PATCH] 7149320: Move sun.misc.VM.booted() to the end of System.initializeSystemClass() Summary: Ensure that sun.misc.VM.booted() is the last action in System.initSystemClass() Reviewed-by: dholmes, alanb --- src/share/classes/java/lang/System.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/share/classes/java/lang/System.java b/src/share/classes/java/lang/System.java index 67ec909f6..95693767b 100644 --- a/src/share/classes/java/lang/System.java +++ b/src/share/classes/java/lang/System.java @@ -1168,11 +1168,6 @@ public final class System { // classes are used. sun.misc.VM.initializeOSEnvironment(); - // Subsystems that are invoked during initialization can invoke - // sun.misc.VM.isBooted() in order to avoid doing things that should - // wait until the application class loader has been set up. - sun.misc.VM.booted(); - // The main thread is not added to its thread group in the same // way as other threads; we must do it ourselves here. Thread current = Thread.currentThread(); @@ -1180,6 +1175,12 @@ public final class System { // register shared secrets setJavaLangAccess(); + + // Subsystems that are invoked during initialization can invoke + // sun.misc.VM.isBooted() in order to avoid doing things that should + // wait until the application class loader has been set up. + // IMPORTANT: Ensure that this remains the last initialization action! + sun.misc.VM.booted(); } private static void setJavaLangAccess() { -- GitLab