hotspot/src/share/vm/runtime/reflection.cpp
changeset 15194 a35093d73168
parent 15102 0a86564e5f61
child 17860 1ad3f2d9b4eb
equal deleted inserted replaced
15192:f71a6fb9b532 15194:a35093d73168
   860   return rh();
   860   return rh();
   861 }
   861 }
   862 
   862 
   863 oop Reflection::new_parameter(Handle method, int index, Symbol* sym,
   863 oop Reflection::new_parameter(Handle method, int index, Symbol* sym,
   864                               int flags, TRAPS) {
   864                               int flags, TRAPS) {
   865   Handle name = java_lang_String::create_from_symbol(sym, CHECK_NULL);
   865   Handle name;
       
   866 
       
   867   // A null symbol here translates to the empty string
       
   868   if(NULL != sym) {
       
   869     name = java_lang_String::create_from_symbol(sym, CHECK_NULL);
       
   870   } else {
       
   871     name = java_lang_String::create_from_str("", CHECK_NULL);
       
   872   }
       
   873 
   866   Handle rh = java_lang_reflect_Parameter::create(CHECK_NULL);
   874   Handle rh = java_lang_reflect_Parameter::create(CHECK_NULL);
   867   java_lang_reflect_Parameter::set_name(rh(), name());
   875   java_lang_reflect_Parameter::set_name(rh(), name());
   868   java_lang_reflect_Parameter::set_modifiers(rh(), flags);
   876   java_lang_reflect_Parameter::set_modifiers(rh(), flags);
   869   java_lang_reflect_Parameter::set_executable(rh(), method());
   877   java_lang_reflect_Parameter::set_executable(rh(), method());
   870   java_lang_reflect_Parameter::set_index(rh(), index);
   878   java_lang_reflect_Parameter::set_index(rh(), index);