hotspot/src/share/vm/opto/library_call.cpp
changeset 13968 8c9029c01470
parent 13895 f6dfe4123709
child 13969 d2a189b83b87
--- a/hotspot/src/share/vm/opto/library_call.cpp	Mon Oct 08 13:02:13 2012 -0700
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Mon Oct 08 17:04:00 2012 -0700
@@ -2378,13 +2378,15 @@
     }
   }
 
-  if (sharpened_klass != NULL) {
+  // The sharpened class might be unloaded if there is no class loader
+  // contraint in place.
+  if (sharpened_klass != NULL && sharpened_klass->is_loaded()) {
     const TypeOopPtr* tjp = TypeOopPtr::make_from_klass(sharpened_klass);
 
 #ifndef PRODUCT
     if (PrintIntrinsics || PrintInlining || PrintOptoInlining) {
-      tty->print("  from base type:  ");   adr_type->dump();
-      tty->print("  sharpened value: ");   tjp->dump();
+      tty->print("  from base type: ");  adr_type->dump();
+      tty->print("  sharpened value: ");  tjp->dump();
     }
 #endif
     // Sharpen the value type.