hotspot/src/share/vm/prims/unsafe.cpp
changeset 14488 ab48109f7d1b
parent 14127 16ba0a8dfde2
child 14588 8ec26d2d9339
equal deleted inserted replaced
14486:7d079e0eedef 14488:ab48109f7d1b
   769     THROW(vmSymbols::java_lang_NullPointerException());
   769     THROW(vmSymbols::java_lang_NullPointerException());
   770   }
   770   }
   771   oop mirror = JNIHandles::resolve_non_null(clazz);
   771   oop mirror = JNIHandles::resolve_non_null(clazz);
   772 
   772 
   773   Klass* klass = java_lang_Class::as_Klass(mirror);
   773   Klass* klass = java_lang_Class::as_Klass(mirror);
   774   if (klass != NULL && Klass::cast(klass)->should_be_initialized()) {
   774   if (klass != NULL && klass->should_be_initialized()) {
   775     InstanceKlass* k = InstanceKlass::cast(klass);
   775     InstanceKlass* k = InstanceKlass::cast(klass);
   776     k->initialize(CHECK);
   776     k->initialize(CHECK);
   777   }
   777   }
   778 }
   778 }
   779 UNSAFE_END
   779 UNSAFE_END
   783   if (clazz == NULL) {
   783   if (clazz == NULL) {
   784     THROW_(vmSymbols::java_lang_NullPointerException(), false);
   784     THROW_(vmSymbols::java_lang_NullPointerException(), false);
   785   }
   785   }
   786   oop mirror = JNIHandles::resolve_non_null(clazz);
   786   oop mirror = JNIHandles::resolve_non_null(clazz);
   787   Klass* klass = java_lang_Class::as_Klass(mirror);
   787   Klass* klass = java_lang_Class::as_Klass(mirror);
   788   if (klass != NULL && Klass::cast(klass)->should_be_initialized()) {
   788   if (klass != NULL && klass->should_be_initialized()) {
   789     return true;
   789     return true;
   790   }
   790   }
   791   return false;
   791   return false;
   792 }
   792 }
   793 UNSAFE_END
   793 UNSAFE_END