--- old/src/hotspot/share/classfile/classLoaderData.cpp 2018-03-06 11:02:26.442976719 -0800 +++ new/src/hotspot/share/classfile/classLoaderData.cpp 2018-03-06 11:02:26.078962813 -0800 @@ -737,13 +737,13 @@ // or a user defined system class loader. (Note that the class loader // data may be anonymous.) bool ClassLoaderData::is_system_class_loader_data() const { - return SystemDictionary::is_system_class_loader(class_loader()); + return !is_anonymous() && SystemDictionary::is_system_class_loader(class_loader()); } // Returns true if this class loader data is for the platform class loader. // (Note that the class loader data may be anonymous.) bool ClassLoaderData::is_platform_class_loader_data() const { - return SystemDictionary::is_platform_class_loader(class_loader()); + return !is_anonymous() && SystemDictionary::is_platform_class_loader(class_loader()); } // Returns true if the class loader for this class loader data is one of