8042418: Remove JVM_FindClassFromClassLoader
authorcoleenp
Sun, 14 Dec 2014 16:04:03 -0500
changeset 28168 b9139c952329
parent 28163 322d55d167be
child 28169 bfdf45af4637
8042418: Remove JVM_FindClassFromClassLoader Summary: The function has been replaced so is no longer used. Reviewed-by: mchung, dholmes
hotspot/make/aix/makefiles/mapfile-vers-debug
hotspot/make/aix/makefiles/mapfile-vers-product
hotspot/make/bsd/makefiles/mapfile-vers-darwin-debug
hotspot/make/bsd/makefiles/mapfile-vers-darwin-product
hotspot/make/bsd/makefiles/mapfile-vers-debug
hotspot/make/bsd/makefiles/mapfile-vers-product
hotspot/make/linux/makefiles/mapfile-vers-debug
hotspot/make/linux/makefiles/mapfile-vers-product
hotspot/make/solaris/makefiles/mapfile-vers
hotspot/src/share/vm/prims/jvm.cpp
hotspot/src/share/vm/prims/jvm.h
--- a/hotspot/make/aix/makefiles/mapfile-vers-debug	Thu Dec 11 21:34:43 2014 -0500
+++ b/hotspot/make/aix/makefiles/mapfile-vers-debug	Sun Dec 14 16:04:03 2014 -0500
@@ -72,7 +72,6 @@
                 JVM_FillInStackTrace;
                 JVM_FindClassFromCaller;
                 JVM_FindClassFromClass;
-                JVM_FindClassFromClassLoader;
                 JVM_FindClassFromBootLoader;
                 JVM_FindLibraryEntry;
                 JVM_FindLoadedClass;
--- a/hotspot/make/aix/makefiles/mapfile-vers-product	Thu Dec 11 21:34:43 2014 -0500
+++ b/hotspot/make/aix/makefiles/mapfile-vers-product	Sun Dec 14 16:04:03 2014 -0500
@@ -72,7 +72,6 @@
                 JVM_FillInStackTrace;
                 JVM_FindClassFromCaller;
                 JVM_FindClassFromClass;
-                JVM_FindClassFromClassLoader;
                 JVM_FindClassFromBootLoader;
                 JVM_FindLibraryEntry;
                 JVM_FindLoadedClass;
--- a/hotspot/make/bsd/makefiles/mapfile-vers-darwin-debug	Thu Dec 11 21:34:43 2014 -0500
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-darwin-debug	Sun Dec 14 16:04:03 2014 -0500
@@ -70,7 +70,6 @@
                 _JVM_FillInStackTrace
                 _JVM_FindClassFromCaller
                 _JVM_FindClassFromClass
-                _JVM_FindClassFromClassLoader
                 _JVM_FindClassFromBootLoader
                 _JVM_FindLibraryEntry
                 _JVM_FindLoadedClass
--- a/hotspot/make/bsd/makefiles/mapfile-vers-darwin-product	Thu Dec 11 21:34:43 2014 -0500
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-darwin-product	Sun Dec 14 16:04:03 2014 -0500
@@ -70,7 +70,6 @@
                 _JVM_FillInStackTrace
                 _JVM_FindClassFromCaller
                 _JVM_FindClassFromClass
-                _JVM_FindClassFromClassLoader
                 _JVM_FindClassFromBootLoader
                 _JVM_FindLibraryEntry
                 _JVM_FindLoadedClass
--- a/hotspot/make/bsd/makefiles/mapfile-vers-debug	Thu Dec 11 21:34:43 2014 -0500
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-debug	Sun Dec 14 16:04:03 2014 -0500
@@ -72,7 +72,6 @@
                 JVM_FillInStackTrace;
                 JVM_FindClassFromCaller;
                 JVM_FindClassFromClass;
-                JVM_FindClassFromClassLoader;
                 JVM_FindClassFromBootLoader;
                 JVM_FindLibraryEntry;
                 JVM_FindLoadedClass;
--- a/hotspot/make/bsd/makefiles/mapfile-vers-product	Thu Dec 11 21:34:43 2014 -0500
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-product	Sun Dec 14 16:04:03 2014 -0500
@@ -72,7 +72,6 @@
                 JVM_FillInStackTrace;
                 JVM_FindClassFromCaller;
                 JVM_FindClassFromClass;
-                JVM_FindClassFromClassLoader;
                 JVM_FindClassFromBootLoader;
                 JVM_FindLibraryEntry;
                 JVM_FindLoadedClass;
--- a/hotspot/make/linux/makefiles/mapfile-vers-debug	Thu Dec 11 21:34:43 2014 -0500
+++ b/hotspot/make/linux/makefiles/mapfile-vers-debug	Sun Dec 14 16:04:03 2014 -0500
@@ -72,7 +72,6 @@
                 JVM_FillInStackTrace;
                 JVM_FindClassFromCaller;
                 JVM_FindClassFromClass;
-                JVM_FindClassFromClassLoader;
                 JVM_FindClassFromBootLoader;
                 JVM_FindLibraryEntry;
                 JVM_FindLoadedClass;
--- a/hotspot/make/linux/makefiles/mapfile-vers-product	Thu Dec 11 21:34:43 2014 -0500
+++ b/hotspot/make/linux/makefiles/mapfile-vers-product	Sun Dec 14 16:04:03 2014 -0500
@@ -72,7 +72,6 @@
                 JVM_FillInStackTrace;
                 JVM_FindClassFromCaller;
                 JVM_FindClassFromClass;
-                JVM_FindClassFromClassLoader;
                 JVM_FindClassFromBootLoader;
                 JVM_FindLibraryEntry;
                 JVM_FindLoadedClass;
--- a/hotspot/make/solaris/makefiles/mapfile-vers	Thu Dec 11 21:34:43 2014 -0500
+++ b/hotspot/make/solaris/makefiles/mapfile-vers	Sun Dec 14 16:04:03 2014 -0500
@@ -72,7 +72,6 @@
                 JVM_FillInStackTrace;
                 JVM_FindClassFromCaller;
                 JVM_FindClassFromClass;
-                JVM_FindClassFromClassLoader;
                 JVM_FindClassFromBootLoader;
                 JVM_FindLibraryEntry;
                 JVM_FindLoadedClass;
--- a/hotspot/src/share/vm/prims/jvm.cpp	Thu Dec 11 21:34:43 2014 -0500
+++ b/hotspot/src/share/vm/prims/jvm.cpp	Sun Dec 14 16:04:03 2014 -0500
@@ -700,23 +700,7 @@
 
 // Returns a class loaded by the bootstrap class loader; or null
 // if not found.  ClassNotFoundException is not thrown.
-//
-// 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.
-
+// FindClassFromBootLoader is exported to the launcher for windows.
 JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
                                               const char* name))
   JVMWrapper2("JVM_FindClassFromBootLoader %s", name);
@@ -740,33 +724,6 @@
   return (jclass) JNIHandles::make_local(env, k->java_mirror());
 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.
 JVM_ENTRY(jclass, JVM_FindClassFromCaller(JNIEnv* env, const char* name,
                                           jboolean init, jobject loader,
--- a/hotspot/src/share/vm/prims/jvm.h	Thu Dec 11 21:34:43 2014 -0500
+++ b/hotspot/src/share/vm/prims/jvm.h	Sun Dec 14 16:04:03 2014 -0500
@@ -335,15 +335,6 @@
 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.
  */
 JNIEXPORT jclass JNICALL