diff --git a/src/share/classes/sun/misc/SharedSecrets.java b/src/share/classes/sun/misc/SharedSecrets.java index 7ebbe46e7122e7ed9009c6c0dbf6f51d8a4dba43..c9f50728860792fe55e9acfedbc446a158af036e 100644 --- a/src/share/classes/sun/misc/SharedSecrets.java +++ b/src/share/classes/sun/misc/SharedSecrets.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2010 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import java.util.jar.JarFile; import java.io.Console; import java.io.File; import java.io.FileDescriptor; +import java.security.ProtectionDomain; /** A repository of "shared secrets", which are a mechanism for calling implementation-private methods in another package without @@ -121,6 +122,8 @@ public class SharedSecrets { public static JavaSecurityProtectionDomainAccess getJavaSecurityProtectionDomainAccess() { + if (javaSecurityProtectionDomainAccess == null) + unsafe.ensureClassInitialized(ProtectionDomain.class); return javaSecurityProtectionDomainAccess; } }