1.1 --- a/src/share/vm/oops/klassVtable.cpp Thu Jan 16 14:25:51 2014 +0100 1.2 +++ b/src/share/vm/oops/klassVtable.cpp Wed Jan 22 17:42:23 2014 -0800 1.3 @@ -622,7 +622,7 @@ 1.4 // this check for all access permissions. 1.5 InstanceKlass *sk = InstanceKlass::cast(super); 1.6 if (sk->has_miranda_methods()) { 1.7 - if (sk->lookup_method_in_all_interfaces(name, signature) != NULL) { 1.8 + if (sk->lookup_method_in_all_interfaces(name, signature, false) != NULL) { 1.9 return false; // found a matching miranda; we do not need a new entry 1.10 } 1.11 } 1.12 @@ -743,7 +743,7 @@ 1.13 if (is_miranda(im, class_methods, default_methods, super)) { // is it a miranda at all? 1.14 InstanceKlass *sk = InstanceKlass::cast(super); 1.15 // check if it is a duplicate of a super's miranda 1.16 - if (sk->lookup_method_in_all_interfaces(im->name(), im->signature()) == NULL) { 1.17 + if (sk->lookup_method_in_all_interfaces(im->name(), im->signature(), false) == NULL) { 1.18 new_mirandas->append(im); 1.19 } 1.20 if (all_mirandas != NULL) { 1.21 @@ -1085,6 +1085,8 @@ 1.22 Method* m = methods->at(i); 1.23 methodHandle target; 1.24 if (m->has_itable_index()) { 1.25 + // This search must match the runtime resolution, i.e. selection search for invokeinterface 1.26 + // to correctly enforce loader constraints for interface method inheritance 1.27 LinkResolver::lookup_instance_method_in_klasses(target, _klass, m->name(), m->signature(), CHECK); 1.28 } 1.29 if (target == NULL || !target->is_public() || target->is_abstract()) {