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
--- a/jdk/src/share/classes/sun/misc/SharedSecrets.java Wed Apr 07 12:30:49 2010 -0700
+++ b/jdk/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;
}
}