mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8042418: Remove JVM_FindClassFromClassLoader
The function has been replaced so is no longer used. Reviewed-by: mchung, dholmes
This commit is contained in:
parent
1d76295d70
commit
f486fa7c1e
11 changed files with 1 additions and 62 deletions
|
@ -72,7 +72,6 @@ SUNWprivate_1.1 {
|
||||||
JVM_FillInStackTrace;
|
JVM_FillInStackTrace;
|
||||||
JVM_FindClassFromCaller;
|
JVM_FindClassFromCaller;
|
||||||
JVM_FindClassFromClass;
|
JVM_FindClassFromClass;
|
||||||
JVM_FindClassFromClassLoader;
|
|
||||||
JVM_FindClassFromBootLoader;
|
JVM_FindClassFromBootLoader;
|
||||||
JVM_FindLibraryEntry;
|
JVM_FindLibraryEntry;
|
||||||
JVM_FindLoadedClass;
|
JVM_FindLoadedClass;
|
||||||
|
|
|
@ -72,7 +72,6 @@ SUNWprivate_1.1 {
|
||||||
JVM_FillInStackTrace;
|
JVM_FillInStackTrace;
|
||||||
JVM_FindClassFromCaller;
|
JVM_FindClassFromCaller;
|
||||||
JVM_FindClassFromClass;
|
JVM_FindClassFromClass;
|
||||||
JVM_FindClassFromClassLoader;
|
|
||||||
JVM_FindClassFromBootLoader;
|
JVM_FindClassFromBootLoader;
|
||||||
JVM_FindLibraryEntry;
|
JVM_FindLibraryEntry;
|
||||||
JVM_FindLoadedClass;
|
JVM_FindLoadedClass;
|
||||||
|
|
|
@ -70,7 +70,6 @@
|
||||||
_JVM_FillInStackTrace
|
_JVM_FillInStackTrace
|
||||||
_JVM_FindClassFromCaller
|
_JVM_FindClassFromCaller
|
||||||
_JVM_FindClassFromClass
|
_JVM_FindClassFromClass
|
||||||
_JVM_FindClassFromClassLoader
|
|
||||||
_JVM_FindClassFromBootLoader
|
_JVM_FindClassFromBootLoader
|
||||||
_JVM_FindLibraryEntry
|
_JVM_FindLibraryEntry
|
||||||
_JVM_FindLoadedClass
|
_JVM_FindLoadedClass
|
||||||
|
|
|
@ -70,7 +70,6 @@
|
||||||
_JVM_FillInStackTrace
|
_JVM_FillInStackTrace
|
||||||
_JVM_FindClassFromCaller
|
_JVM_FindClassFromCaller
|
||||||
_JVM_FindClassFromClass
|
_JVM_FindClassFromClass
|
||||||
_JVM_FindClassFromClassLoader
|
|
||||||
_JVM_FindClassFromBootLoader
|
_JVM_FindClassFromBootLoader
|
||||||
_JVM_FindLibraryEntry
|
_JVM_FindLibraryEntry
|
||||||
_JVM_FindLoadedClass
|
_JVM_FindLoadedClass
|
||||||
|
|
|
@ -72,7 +72,6 @@ SUNWprivate_1.1 {
|
||||||
JVM_FillInStackTrace;
|
JVM_FillInStackTrace;
|
||||||
JVM_FindClassFromCaller;
|
JVM_FindClassFromCaller;
|
||||||
JVM_FindClassFromClass;
|
JVM_FindClassFromClass;
|
||||||
JVM_FindClassFromClassLoader;
|
|
||||||
JVM_FindClassFromBootLoader;
|
JVM_FindClassFromBootLoader;
|
||||||
JVM_FindLibraryEntry;
|
JVM_FindLibraryEntry;
|
||||||
JVM_FindLoadedClass;
|
JVM_FindLoadedClass;
|
||||||
|
|
|
@ -72,7 +72,6 @@ SUNWprivate_1.1 {
|
||||||
JVM_FillInStackTrace;
|
JVM_FillInStackTrace;
|
||||||
JVM_FindClassFromCaller;
|
JVM_FindClassFromCaller;
|
||||||
JVM_FindClassFromClass;
|
JVM_FindClassFromClass;
|
||||||
JVM_FindClassFromClassLoader;
|
|
||||||
JVM_FindClassFromBootLoader;
|
JVM_FindClassFromBootLoader;
|
||||||
JVM_FindLibraryEntry;
|
JVM_FindLibraryEntry;
|
||||||
JVM_FindLoadedClass;
|
JVM_FindLoadedClass;
|
||||||
|
|
|
@ -72,7 +72,6 @@ SUNWprivate_1.1 {
|
||||||
JVM_FillInStackTrace;
|
JVM_FillInStackTrace;
|
||||||
JVM_FindClassFromCaller;
|
JVM_FindClassFromCaller;
|
||||||
JVM_FindClassFromClass;
|
JVM_FindClassFromClass;
|
||||||
JVM_FindClassFromClassLoader;
|
|
||||||
JVM_FindClassFromBootLoader;
|
JVM_FindClassFromBootLoader;
|
||||||
JVM_FindLibraryEntry;
|
JVM_FindLibraryEntry;
|
||||||
JVM_FindLoadedClass;
|
JVM_FindLoadedClass;
|
||||||
|
|
|
@ -72,7 +72,6 @@ SUNWprivate_1.1 {
|
||||||
JVM_FillInStackTrace;
|
JVM_FillInStackTrace;
|
||||||
JVM_FindClassFromCaller;
|
JVM_FindClassFromCaller;
|
||||||
JVM_FindClassFromClass;
|
JVM_FindClassFromClass;
|
||||||
JVM_FindClassFromClassLoader;
|
|
||||||
JVM_FindClassFromBootLoader;
|
JVM_FindClassFromBootLoader;
|
||||||
JVM_FindLibraryEntry;
|
JVM_FindLibraryEntry;
|
||||||
JVM_FindLoadedClass;
|
JVM_FindLoadedClass;
|
||||||
|
|
|
@ -72,7 +72,6 @@ SUNWprivate_1.1 {
|
||||||
JVM_FillInStackTrace;
|
JVM_FillInStackTrace;
|
||||||
JVM_FindClassFromCaller;
|
JVM_FindClassFromCaller;
|
||||||
JVM_FindClassFromClass;
|
JVM_FindClassFromClass;
|
||||||
JVM_FindClassFromClassLoader;
|
|
||||||
JVM_FindClassFromBootLoader;
|
JVM_FindClassFromBootLoader;
|
||||||
JVM_FindLibraryEntry;
|
JVM_FindLibraryEntry;
|
||||||
JVM_FindLoadedClass;
|
JVM_FindLoadedClass;
|
||||||
|
|
|
@ -700,23 +700,7 @@ JVM_END
|
||||||
|
|
||||||
// Returns a class loaded by the bootstrap class loader; or null
|
// Returns a class loaded by the bootstrap class loader; or null
|
||||||
// if not found. ClassNotFoundException is not thrown.
|
// if not found. ClassNotFoundException is not thrown.
|
||||||
//
|
// FindClassFromBootLoader is exported to the launcher for windows.
|
||||||
// Rationale behind JVM_FindClassFromBootLoader
|
|
||||||
// a> JVM_FindClassFromClassLoader was never exported in the export tables.
|
|
||||||
// b> because of (a) java.dll has a direct dependecy on the unexported
|
|
||||||
// private symbol "_JVM_FindClassFromClassLoader@20".
|
|
||||||
// c> the launcher cannot use the private symbol as it dynamically opens
|
|
||||||
// the entry point, so if something changes, the launcher will fail
|
|
||||||
// unexpectedly at runtime, it is safest for the launcher to dlopen a
|
|
||||||
// stable exported interface.
|
|
||||||
// d> re-exporting JVM_FindClassFromClassLoader as public, will cause its
|
|
||||||
// signature to change from _JVM_FindClassFromClassLoader@20 to
|
|
||||||
// JVM_FindClassFromClassLoader and will not be backward compatible
|
|
||||||
// with older JDKs.
|
|
||||||
// Thus a public/stable exported entry point is the right solution,
|
|
||||||
// public here means public in linker semantics, and is exported only
|
|
||||||
// to the JDK, and is not intended to be a public API.
|
|
||||||
|
|
||||||
JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
|
JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
|
||||||
const char* name))
|
const char* name))
|
||||||
JVMWrapper2("JVM_FindClassFromBootLoader %s", name);
|
JVMWrapper2("JVM_FindClassFromBootLoader %s", name);
|
||||||
|
@ -740,33 +724,6 @@ JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
|
||||||
return (jclass) JNIHandles::make_local(env, k->java_mirror());
|
return (jclass) JNIHandles::make_local(env, k->java_mirror());
|
||||||
JVM_END
|
JVM_END
|
||||||
|
|
||||||
// Not used; JVM_FindClassFromCaller replaces this.
|
|
||||||
JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name,
|
|
||||||
jboolean init, jobject loader,
|
|
||||||
jboolean throwError))
|
|
||||||
JVMWrapper3("JVM_FindClassFromClassLoader %s throw %s", name,
|
|
||||||
throwError ? "error" : "exception");
|
|
||||||
// Java libraries should ensure that name is never null...
|
|
||||||
if (name == NULL || (int)strlen(name) > Symbol::max_length()) {
|
|
||||||
// It's impossible to create this class; the name cannot fit
|
|
||||||
// into the constant pool.
|
|
||||||
if (throwError) {
|
|
||||||
THROW_MSG_0(vmSymbols::java_lang_NoClassDefFoundError(), name);
|
|
||||||
} else {
|
|
||||||
THROW_MSG_0(vmSymbols::java_lang_ClassNotFoundException(), name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
TempNewSymbol h_name = SymbolTable::new_symbol(name, CHECK_NULL);
|
|
||||||
Handle h_loader(THREAD, JNIHandles::resolve(loader));
|
|
||||||
jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
|
|
||||||
Handle(), throwError, THREAD);
|
|
||||||
|
|
||||||
if (TraceClassResolution && result != NULL) {
|
|
||||||
trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
JVM_END
|
|
||||||
|
|
||||||
// Find a class with this name in this loader, using the caller's protection domain.
|
// Find a class with this name in this loader, using the caller's protection domain.
|
||||||
JVM_ENTRY(jclass, JVM_FindClassFromCaller(JNIEnv* env, const char* name,
|
JVM_ENTRY(jclass, JVM_FindClassFromCaller(JNIEnv* env, const char* name,
|
||||||
jboolean init, jobject loader,
|
jboolean init, jobject loader,
|
||||||
|
|
|
@ -334,15 +334,6 @@ JVM_GetCallerClass(JNIEnv *env, int n);
|
||||||
JNIEXPORT jclass JNICALL
|
JNIEXPORT jclass JNICALL
|
||||||
JVM_FindPrimitiveClass(JNIEnv *env, const char *utf);
|
JVM_FindPrimitiveClass(JNIEnv *env, const char *utf);
|
||||||
|
|
||||||
/*
|
|
||||||
* Find a class from a given class loader. Throw ClassNotFoundException
|
|
||||||
* or NoClassDefFoundError depending on the value of the last
|
|
||||||
* argument.
|
|
||||||
*/
|
|
||||||
JNIEXPORT jclass JNICALL
|
|
||||||
JVM_FindClassFromClassLoader(JNIEnv *env, const char *name, jboolean init,
|
|
||||||
jobject loader, jboolean throwError);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find a class from a boot class loader. Returns NULL if class not found.
|
* Find a class from a boot class loader. Returns NULL if class not found.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue