src/share/vm/interpreter/linkResolver.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
bug_8027804.2 Cdiff src/share/vm/interpreter/linkResolver.cpp
src/share/vm/interpreter/linkResolver.cpp
Print this page
*** 316,326 ****
return vtable_index;
}
void LinkResolver::lookup_method_in_interfaces(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) {
InstanceKlass *ik = InstanceKlass::cast(klass());
! result = methodHandle(THREAD, ik->lookup_method_in_all_interfaces(name, signature));
}
void LinkResolver::lookup_polymorphic_method(methodHandle& result,
KlassHandle klass, Symbol* name, Symbol* full_signature,
KlassHandle current_klass,
--- 316,330 ----
return vtable_index;
}
void LinkResolver::lookup_method_in_interfaces(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) {
InstanceKlass *ik = InstanceKlass::cast(klass());
!
! // Specify 'true' in order to skip default methods when searching the
! // interfaces. Function lookup_method_in_klasses() already looked for
! // the method in the default methods table.
! result = methodHandle(THREAD, ik->lookup_method_in_all_interfaces(name, signature, true));
}
void LinkResolver::lookup_polymorphic_method(methodHandle& result,
KlassHandle klass, Symbol* name, Symbol* full_signature,
KlassHandle current_klass,
*** 1285,1296 ****
--- 1289,1303 ----
jio_snprintf(buf, sizeof(buf), "Class %s does not implement the requested interface %s",
recv_klass()->external_name(),
resolved_klass()->external_name());
THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
}
+
// do lookup based on receiver klass
methodHandle sel_method;
+ // This search must match the linktime preparation search for itable initialization
+ // to correctly enforce loader constraints for interface method inheritance
lookup_instance_method_in_klasses(sel_method, recv_klass,
resolved_method->name(),
resolved_method->signature(), CHECK);
if (sel_method.is_null() && !check_null_and_abstract) {
// In theory this is a harmless placeholder value, but
src/share/vm/interpreter/linkResolver.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File