src/share/classes/javax/crypto/JceSecurity.java
Print this page
@@ -217,10 +217,11 @@
/*
* Retuns the CodeBase for the given class.
*/
static URL getCodeBase(final Class<?> clazz) {
+ synchronized (codeBaseCacheRef) {
URL url = codeBaseCacheRef.get(clazz);
if (url == null) {
url = AccessController.doPrivileged(new PrivilegedAction<URL>() {
public URL run() {
ProtectionDomain pd = clazz.getProtectionDomain();
@@ -235,10 +236,11 @@
});
codeBaseCacheRef.put(clazz, url);
}
return (url == NULL_URL) ? null : url;
}
+ }
private static void setupJurisdictionPolicies() throws Exception {
String javaHomeDir = System.getProperty("java.home");
String sep = File.separator;
String pathToPolicyJar = javaHomeDir + sep + "lib" + sep +