changeset 39224:7c26725c0813

8158681: ClassLoader::classloader_type() is called from code not included under #if INCLUDE_CDS. Summary: Place CDS related code under #if INCLUDE_CDS. Reviewed-by: lfoltan, gtriantafill, coleenp
author jiangli
date Wed, 08 Jun 2016 18:47:05 -0400
parents cf2d48fdf795
children ff6081f6f96b
files hotspot/src/share/vm/classfile/classLoaderExt.hpp
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/classfile/classLoaderExt.hpp	Wed Jun 08 18:09:04 2016 +0200
+++ b/hotspot/src/share/vm/classfile/classLoaderExt.hpp	Wed Jun 08 18:47:05 2016 -0400
@@ -54,12 +54,14 @@
                                       const s2 classpath_index,
                                       instanceKlassHandle result, TRAPS) {
       if (ClassLoader::add_package(_file_name, classpath_index, THREAD)) {
+#if INCLUDE_CDS
         if (DumpSharedSpaces) {
           s2 classloader_type = ClassLoader::classloader_type(
                           class_name, e, classpath_index, CHECK_(result));
           result->set_shared_classpath_index(classpath_index);
           result->set_class_loader_type(classloader_type);
         }
+#endif
         return result;
       } else {
         return instanceKlassHandle(); // NULL