changeset 9984:58ff624dbef7

Remove handling of the anonymous class prior to calling set_package(), the classLoader of an anonymous class is the same as its host class.
author lfoltan
date Thu, 07 Jan 2016 13:31:18 -0500
parents 33007ca5f45b
children bfa5e6b04b81
files src/share/vm/classfile/classFileParser.cpp
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp	Tue Jan 05 11:55:40 2016 -0500
+++ b/src/share/vm/classfile/classFileParser.cpp	Thu Jan 07 13:31:18 2016 -0500
@@ -4151,13 +4151,8 @@
       this_klass->set_host_klass(host_klass());
     }
 
-    // After the majority of the set up for this_klass has occurred,
-    // set its PackageEntry.  Critical to be done after set_name
-    // and set_host_klass in order to handle anonymous classes
-    // properly.
-    oop cl = this_klass->is_anonymous() ? this_klass->host_klass()->class_loader() :
-                                          this_klass->class_loader();
-
+    // Set PackageEntry for this_klass
+    oop cl = this_klass->class_loader();
     Handle clh = Handle(THREAD, java_lang_ClassLoader::non_reflection_class_loader(cl));
     ClassLoaderData* cld = ClassLoaderData::class_loader_data_or_null(clh());
     this_klass->set_package(this_klass->name(), cld, CHECK_NULL);