# HG changeset patch # User hseigel # Date 1373326582 14400 # Node ID e3a2db7d95b029c732ad0afbbf83a9c6bdc48f0a # Parent 6ad330ce9523b61130611275f524bf3aae914d8c 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 diff -r 6ad330ce9523 -r e3a2db7d95b0 hotspot/make/bsd/makefiles/mapfile-vers-debug --- a/hotspot/make/bsd/makefiles/mapfile-vers-debug Fri Jul 05 08:09:40 2013 -0700 +++ b/hotspot/make/bsd/makefiles/mapfile-vers-debug Mon Jul 08 19:36:22 2013 -0400 @@ -221,7 +221,6 @@ _JVM_SetLength _JVM_SetNativeThreadName _JVM_SetPrimitiveArrayElement - _JVM_SetProtectionDomain _JVM_SetSockOpt _JVM_SetThreadPriority _JVM_Sleep diff -r 6ad330ce9523 -r e3a2db7d95b0 hotspot/make/bsd/makefiles/mapfile-vers-product --- a/hotspot/make/bsd/makefiles/mapfile-vers-product Fri Jul 05 08:09:40 2013 -0700 +++ b/hotspot/make/bsd/makefiles/mapfile-vers-product Mon Jul 08 19:36:22 2013 -0400 @@ -221,7 +221,6 @@ _JVM_SetLength _JVM_SetNativeThreadName _JVM_SetPrimitiveArrayElement - _JVM_SetProtectionDomain _JVM_SetSockOpt _JVM_SetThreadPriority _JVM_Sleep diff -r 6ad330ce9523 -r e3a2db7d95b0 hotspot/make/linux/makefiles/mapfile-vers-debug --- a/hotspot/make/linux/makefiles/mapfile-vers-debug Fri Jul 05 08:09:40 2013 -0700 +++ b/hotspot/make/linux/makefiles/mapfile-vers-debug Mon Jul 08 19:36:22 2013 -0400 @@ -223,7 +223,6 @@ JVM_SetLength; JVM_SetNativeThreadName; JVM_SetPrimitiveArrayElement; - JVM_SetProtectionDomain; JVM_SetSockOpt; JVM_SetThreadPriority; JVM_Sleep; diff -r 6ad330ce9523 -r e3a2db7d95b0 hotspot/make/linux/makefiles/mapfile-vers-product --- a/hotspot/make/linux/makefiles/mapfile-vers-product Fri Jul 05 08:09:40 2013 -0700 +++ b/hotspot/make/linux/makefiles/mapfile-vers-product Mon Jul 08 19:36:22 2013 -0400 @@ -223,7 +223,6 @@ JVM_SetLength; JVM_SetNativeThreadName; JVM_SetPrimitiveArrayElement; - JVM_SetProtectionDomain; JVM_SetSockOpt; JVM_SetThreadPriority; JVM_Sleep; diff -r 6ad330ce9523 -r e3a2db7d95b0 hotspot/make/solaris/makefiles/mapfile-vers --- a/hotspot/make/solaris/makefiles/mapfile-vers Fri Jul 05 08:09:40 2013 -0700 +++ b/hotspot/make/solaris/makefiles/mapfile-vers Mon Jul 08 19:36:22 2013 -0400 @@ -223,7 +223,6 @@ JVM_SetLength; JVM_SetNativeThreadName; JVM_SetPrimitiveArrayElement; - JVM_SetProtectionDomain; JVM_SetSockOpt; JVM_SetThreadPriority; JVM_Sleep; diff -r 6ad330ce9523 -r e3a2db7d95b0 hotspot/src/share/vm/classfile/javaClasses.hpp --- a/hotspot/src/share/vm/classfile/javaClasses.hpp Fri Jul 05 08:09:40 2013 -0700 +++ b/hotspot/src/share/vm/classfile/javaClasses.hpp Mon Jul 08 19:36:22 2013 -0400 @@ -234,6 +234,7 @@ static GrowableArray* _fixup_mirror_list; static void set_init_lock(oop java_class, oop init_lock); + static void set_protection_domain(oop java_class, oop protection_domain); public: static void compute_offsets(); @@ -272,7 +273,6 @@ // Support for embedded per-class oops static oop protection_domain(oop java_class); - static void set_protection_domain(oop java_class, oop protection_domain); static oop init_lock(oop java_class); static objArrayOop signers(oop java_class); static void set_signers(oop java_class, objArrayOop signers); diff -r 6ad330ce9523 -r e3a2db7d95b0 hotspot/src/share/vm/prims/jvm.cpp --- a/hotspot/src/share/vm/prims/jvm.cpp Fri Jul 05 08:09:40 2013 -0700 +++ b/hotspot/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. diff -r 6ad330ce9523 -r e3a2db7d95b0 hotspot/src/share/vm/prims/jvm.h --- a/hotspot/src/share/vm/prims/jvm.h Fri Jul 05 08:09:40 2013 -0700 +++ b/hotspot/src/share/vm/prims/jvm.h Mon Jul 08 19:36:22 2013 -0400 @@ -471,9 +471,6 @@ JNIEXPORT jobject JNICALL JVM_GetProtectionDomain(JNIEnv *env, jclass cls); -JNIEXPORT void JNICALL -JVM_SetProtectionDomain(JNIEnv *env, jclass cls, jobject protection_domain); - JNIEXPORT jboolean JNICALL JVM_IsArrayClass(JNIEnv *env, jclass cls);