src/hotspot/share/prims/jni.cpp
changeset 54847 59ea39bb2809
parent 54669 ad45b3802d4e
child 57570 d7304cf430f1
child 58678 9cf78a70fa4f
equal deleted inserted replaced
54846:e4049522b074 54847:59ea39bb2809
   327                          "Class name exceeds maximum length of %d: %s",
   327                          "Class name exceeds maximum length of %d: %s",
   328                          Symbol::max_length(),
   328                          Symbol::max_length(),
   329                          name);
   329                          name);
   330       return 0;
   330       return 0;
   331     }
   331     }
   332     class_name = SymbolTable::new_symbol(name, CHECK_NULL);
   332     class_name = SymbolTable::new_symbol(name);
   333   }
   333   }
   334   ResourceMark rm(THREAD);
   334   ResourceMark rm(THREAD);
   335   ClassFileStream st((u1*)buf, bufLen, NULL, ClassFileStream::verify);
   335   ClassFileStream st((u1*)buf, bufLen, NULL, ClassFileStream::verify);
   336   Handle class_loader (THREAD, JNIHandles::resolve(loaderRef));
   336   Handle class_loader (THREAD, JNIHandles::resolve(loaderRef));
   337 
   337 
   414     } else {
   414     } else {
   415       loader = Handle(THREAD, k->class_loader());
   415       loader = Handle(THREAD, k->class_loader());
   416     }
   416     }
   417   }
   417   }
   418 
   418 
   419   TempNewSymbol sym = SymbolTable::new_symbol(name, CHECK_NULL);
   419   TempNewSymbol sym = SymbolTable::new_symbol(name);
   420   result = find_class_from_class_loader(env, sym, true, loader,
   420   result = find_class_from_class_loader(env, sym, true, loader,
   421                                         protection_domain, true, thread);
   421                                         protection_domain, true, thread);
   422 
   422 
   423   if (log_is_enabled(Debug, class, resolve) && result != NULL) {
   423   if (log_is_enabled(Debug, class, resolve) && result != NULL) {
   424     trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
   424     trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
  3286 
  3286 
  3287 static jclass lookupOne(JNIEnv* env, const char* name, TRAPS) {
  3287 static jclass lookupOne(JNIEnv* env, const char* name, TRAPS) {
  3288   Handle loader;            // null (bootstrap) loader
  3288   Handle loader;            // null (bootstrap) loader
  3289   Handle protection_domain; // null protection domain
  3289   Handle protection_domain; // null protection domain
  3290 
  3290 
  3291   TempNewSymbol sym = SymbolTable::new_symbol(name, CHECK_NULL);
  3291   TempNewSymbol sym = SymbolTable::new_symbol(name);
  3292   jclass result =  find_class_from_class_loader(env, sym, true, loader, protection_domain, true, CHECK_NULL);
  3292   jclass result =  find_class_from_class_loader(env, sym, true, loader, protection_domain, true, CHECK_NULL);
  3293 
  3293 
  3294   if (log_is_enabled(Debug, class, resolve) && result != NULL) {
  3294   if (log_is_enabled(Debug, class, resolve) && result != NULL) {
  3295     trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
  3295     trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
  3296   }
  3296   }