Mercurial > hg > truffle
diff src/share/vm/prims/jvm.cpp @ 11099:ba9dacff9c9d
8014399: Remove JVM_SetProtectionDomain from hotspot
Summary: JVM_SetProtectionDomain has been deprecated since 1.5 and is being removed
Reviewed-by: coleenp, hseigel
Contributed-by: eric.mccorkle@oracle.com
author | hseigel |
---|---|
date | Mon, 08 Jul 2013 19:36:22 -0400 |
parents | 9f3e3245b50f |
children | 6b0fd0964b87 b2e698d2276c 4f9a42c33738 bdd155477289 |
line wrap: on
line diff
--- a/src/share/vm/prims/jvm.cpp Fri Jul 05 08:09:40 2013 -0700 +++ b/src/share/vm/prims/jvm.cpp Mon Jul 08 19:36:22 2013 -0400 @@ -1121,26 +1121,6 @@ JVM_END -// Obsolete since 1.2 (Class.setProtectionDomain removed), although -// still defined in core libraries as of 1.5. -JVM_ENTRY(void, JVM_SetProtectionDomain(JNIEnv *env, jclass cls, jobject protection_domain)) - JVMWrapper("JVM_SetProtectionDomain"); - if (JNIHandles::resolve(cls) == NULL) { - THROW(vmSymbols::java_lang_NullPointerException()); - } - if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) { - // Call is ignored for primitive types - Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls)); - - // cls won't be an array, as this called only from ClassLoader.defineClass - if (k->oop_is_instance()) { - oop pd = JNIHandles::resolve(protection_domain); - assert(pd == NULL || pd->is_oop(), "just checking"); - java_lang_Class::set_protection_domain(k->java_mirror(), pd); - } - } -JVM_END - static bool is_authorized(Handle context, instanceKlassHandle klass, TRAPS) { // If there is a security manager and protection domain, check the access // in the protection domain, otherwise it is authorized.