< prev index next >

src/share/vm/classfile/loaderConstraints.cpp

Print this page

        

*** 439,459 **** if (probe->klass() != NULL) { InstanceKlass* ik = probe->klass(); guarantee(ik->name() == probe->name(), "name should match"); Symbol* name = ik->name(); ClassLoaderData* loader_data = ik->class_loader_data(); ! Dictionary* dictionary = loader_data->dictionary_or_null(); ! assert(dictionary != NULL, "no dictionary for this loader constraint entry?"); unsigned int d_hash = dictionary->compute_hash(name); int d_index = dictionary->hash_to_index(d_hash); InstanceKlass* k = dictionary->find_class(d_index, d_hash, name); if (k != NULL) { ! // We found the class in the system dictionary, so we should // make sure that the Klass* matches what we already have. guarantee(k == probe->klass(), "klass should be in dictionary"); } else { ! // If we don't find the class in the system dictionary, it // has to be in the placeholders table. unsigned int p_hash = placeholders->compute_hash(name); int p_index = placeholders->hash_to_index(p_hash); PlaceholderEntry* entry = placeholders->get_entry(p_index, p_hash, name, loader_data); --- 439,458 ---- if (probe->klass() != NULL) { InstanceKlass* ik = probe->klass(); guarantee(ik->name() == probe->name(), "name should match"); Symbol* name = ik->name(); ClassLoaderData* loader_data = ik->class_loader_data(); ! Dictionary* dictionary = loader_data->dictionary(); unsigned int d_hash = dictionary->compute_hash(name); int d_index = dictionary->hash_to_index(d_hash); InstanceKlass* k = dictionary->find_class(d_index, d_hash, name); if (k != NULL) { ! // We found the class in the dictionary, so we should // make sure that the Klass* matches what we already have. guarantee(k == probe->klass(), "klass should be in dictionary"); } else { ! // If we don't find the class in the dictionary, it // has to be in the placeholders table. unsigned int p_hash = placeholders->compute_hash(name); int p_index = placeholders->hash_to_index(p_hash); PlaceholderEntry* entry = placeholders->get_entry(p_index, p_hash, name, loader_data);
< prev index next >