hotspot/src/share/vm/prims/jvm.cpp
changeset 13952 e3cf184080bc
parent 13728 882756847a04
child 14391 df0a1573d5bd
equal deleted inserted replaced
13918:b01a48301e67 13952:e3cf184080bc
  1046   // If there are no signers set in the class, or if the class
  1046   // If there are no signers set in the class, or if the class
  1047   // is an array, return NULL.
  1047   // is an array, return NULL.
  1048   if (signers == NULL) return NULL;
  1048   if (signers == NULL) return NULL;
  1049 
  1049 
  1050   // copy of the signers array
  1050   // copy of the signers array
  1051   Klass* element = objArrayKlass::cast(signers->klass())->element_klass();
  1051   Klass* element = ObjArrayKlass::cast(signers->klass())->element_klass();
  1052   objArrayOop signers_copy = oopFactory::new_objArray(element, signers->length(), CHECK_NULL);
  1052   objArrayOop signers_copy = oopFactory::new_objArray(element, signers->length(), CHECK_NULL);
  1053   for (int index = 0; index < signers->length(); index++) {
  1053   for (int index = 0; index < signers->length(); index++) {
  1054     signers_copy->obj_at_put(index, signers->obj_at(index));
  1054     signers_copy->obj_at_put(index, signers->obj_at(index));
  1055   }
  1055   }
  1056 
  1056 
  3300   Klass* k = java_lang_Class::as_Klass(mirror);
  3300   Klass* k = java_lang_Class::as_Klass(mirror);
  3301   oop result;
  3301   oop result;
  3302 
  3302 
  3303   if (k->oop_is_typeArray()) {
  3303   if (k->oop_is_typeArray()) {
  3304     // typeArray
  3304     // typeArray
  3305     result = typeArrayKlass::cast(k)->allocate(length, CHECK_NULL);
  3305     result = TypeArrayKlass::cast(k)->allocate(length, CHECK_NULL);
  3306   } else if (k->oop_is_objArray()) {
  3306   } else if (k->oop_is_objArray()) {
  3307     // objArray
  3307     // objArray
  3308     objArrayKlass* oak = objArrayKlass::cast(k);
  3308     ObjArrayKlass* oak = ObjArrayKlass::cast(k);
  3309     oak->initialize(CHECK_NULL); // make sure class is initialized (matches Classic VM behavior)
  3309     oak->initialize(CHECK_NULL); // make sure class is initialized (matches Classic VM behavior)
  3310     result = oak->allocate(length, CHECK_NULL);
  3310     result = oak->allocate(length, CHECK_NULL);
  3311   } else {
  3311   } else {
  3312     THROW_0(vmSymbols::java_lang_InvalidClassException());
  3312     THROW_0(vmSymbols::java_lang_InvalidClassException());
  3313   }
  3313   }
  4191   if (num_threads == 0) {
  4191   if (num_threads == 0) {
  4192     THROW_(vmSymbols::java_lang_IllegalArgumentException(), 0);
  4192     THROW_(vmSymbols::java_lang_IllegalArgumentException(), 0);
  4193   }
  4193   }
  4194 
  4194 
  4195   // check if threads is not an array of objects of Thread class
  4195   // check if threads is not an array of objects of Thread class
  4196   Klass* k = objArrayKlass::cast(ah->klass())->element_klass();
  4196   Klass* k = ObjArrayKlass::cast(ah->klass())->element_klass();
  4197   if (k != SystemDictionary::Thread_klass()) {
  4197   if (k != SystemDictionary::Thread_klass()) {
  4198     THROW_(vmSymbols::java_lang_IllegalArgumentException(), 0);
  4198     THROW_(vmSymbols::java_lang_IllegalArgumentException(), 0);
  4199   }
  4199   }
  4200 
  4200 
  4201   ResourceMark rm(THREAD);
  4201   ResourceMark rm(THREAD);