src/hotspot/share/classfile/systemDictionary.cpp
changeset 51268 4ac20e5f96ce
parent 51180 b7eb9cc56277
child 51329 9c68699bebe5
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Tue Jul 31 13:12:06 2018 -0400
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Tue Jul 31 14:24:10 2018 -0400
@@ -443,8 +443,18 @@
     // Print out trace information
     LogStream ls(lt);
     ls.print_cr("Checking package access");
-    ls.print("class loader: "); class_loader()->print_value_on(&ls);
-    ls.print(" protection domain: "); protection_domain()->print_value_on(&ls);
+    if (class_loader() != NULL) {
+      ls.print("class loader: ");
+      class_loader()->print_value_on(&ls);
+    } else {
+      ls.print_cr("class loader: NULL");
+    }
+    if (protection_domain() != NULL) {
+      ls.print(" protection domain: ");
+      protection_domain()->print_value_on(&ls);
+    } else {
+      ls.print_cr(" protection domain: NULL");
+    }
     ls.print(" loading: "); klass->print_value_on(&ls);
     ls.cr();
   }