< prev index next >

src/hotspot/share/oops/constantPool.cpp

Print this page
*** 494,24 ***
    }
  
    Handle mirror_handle;
    Symbol* name = this_cp->symbol_at(name_index);
    bool value_type_signature = false;
    if (name->is_Q_signature()) {
      name = name->fundamental_name(THREAD);
      value_type_signature = true;
    }
    Handle loader (THREAD, this_cp->pool_holder()->class_loader());
    Handle protection_domain (THREAD, this_cp->pool_holder()->protection_domain());
  
    Klass* k;
    {
      // Turn off the single stepping while doing class resolution
      JvmtiHideSingleStepping jhss(javaThread);
      k = SystemDictionary::resolve_or_fail(name, loader, protection_domain, true, THREAD);
    } //  JvmtiHideSingleStepping jhss(javaThread);
!   if (value_type_signature) {
      name->decrement_refcount();
    }
  
    if (!HAS_PENDING_EXCEPTION) {
      // preserve the resolved klass from unloading
--- 494,29 ---
    }
  
    Handle mirror_handle;
    Symbol* name = this_cp->symbol_at(name_index);
    bool value_type_signature = false;
+   bool had_envelope = false;
    if (name->is_Q_signature()) {
      name = name->fundamental_name(THREAD);
      value_type_signature = true;
+     had_envelope = true;
+   } else if (name->is_L_signature()) {
+     name = name->fundamental_name(THREAD);
+     had_envelope = true;
    }
    Handle loader (THREAD, this_cp->pool_holder()->class_loader());
    Handle protection_domain (THREAD, this_cp->pool_holder()->protection_domain());
  
    Klass* k;
    {
      // Turn off the single stepping while doing class resolution
      JvmtiHideSingleStepping jhss(javaThread);
      k = SystemDictionary::resolve_or_fail(name, loader, protection_domain, true, THREAD);
    } //  JvmtiHideSingleStepping jhss(javaThread);
!   if (had_envelope) {
      name->decrement_refcount();
    }
  
    if (!HAS_PENDING_EXCEPTION) {
      // preserve the resolved klass from unloading
< prev index next >