mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8179424: Remove terminally deprecated sun.reflect.Reflection.getCallerClass
Reviewed-by: alanb, dfuchs, dholmes, lancea, mchung, rriggs
This commit is contained in:
parent
df559fe00e
commit
a2000f8720
13 changed files with 22 additions and 247 deletions
|
@ -678,17 +678,9 @@ JVM_END
|
|||
// Misc. class handling ///////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
JVM_ENTRY(jclass, JVM_GetCallerClass(JNIEnv* env, int depth))
|
||||
JVM_ENTRY(jclass, JVM_GetCallerClass(JNIEnv* env))
|
||||
JVMWrapper("JVM_GetCallerClass");
|
||||
|
||||
// Pre-JDK 8 and early builds of JDK 8 don't have a CallerSensitive annotation; or
|
||||
// sun.reflect.Reflection.getCallerClass with a depth parameter is provided
|
||||
// temporarily for existing code to use until a replacement API is defined.
|
||||
if (SystemDictionary::reflect_CallerSensitive_klass() == NULL || depth != JVM_CALLER_DEPTH) {
|
||||
Klass* k = thread->security_get_caller_class(depth);
|
||||
return (k == NULL) ? NULL : (jclass) JNIHandles::make_local(env, k->java_mirror());
|
||||
}
|
||||
|
||||
// Getting the class of the caller frame.
|
||||
//
|
||||
// The call stack at this point looks something like this:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue