changeset 2298:710c4493902f

6909281: 6u19 b99(pit):Error loading first applet in browser session( both FF && IE, windows ): NPE is thrown Summary: Fix for 6633872 causes NPE due to uninitialised ProtectionDomain class Reviewed-by: andrew
author mullan
date Fri, 09 Apr 2010 07:21:46 -0700
parents fc7c38b2584c
children 89f4ec9e4b33
files src/share/classes/sun/misc/SharedSecrets.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/misc/SharedSecrets.java	Wed Apr 07 12:30:49 2010 -0700
+++ b/src/share/classes/sun/misc/SharedSecrets.java	Fri Apr 09 07:21:46 2010 -0700
@@ -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.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 static JavaSecurityProtectionDomainAccess
         getJavaSecurityProtectionDomainAccess() {
+            if (javaSecurityProtectionDomainAccess == null)
+                unsafe.ensureClassInitialized(ProtectionDomain.class);
             return javaSecurityProtectionDomainAccess;
     }
 }