void LinkResolver::lookup_instance_method_in_klasses(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) {
  Method* result_oop = klass->uncached_lookup_method(name, signature, Klass::find_overpass);
  result = methodHandle(THREAD, result_oop);
  while (!result.is_null() && result->is_static() && result->method_holder()->super() != NULL) {
    KlassHandle super_klass = KlassHandle(THREAD, result->method_holder()->super());
    result = methodHandle(THREAD, super_klass->uncached_lookup_method(name, signature, Klass::find_overpass));
  }

  if (klass->oop_is_array()) {
    // Only consider klass and super klass for arrays
    return;
  }

  if (result.is_null()) {
    Array<Method*>* default_methods = InstanceKlass::cast(klass())->default_methods();
    if (default_methods != NULL) {
      result = methodHandle(InstanceKlass::find_method(default_methods, name, signature));
      assert(result.is_null() || !result->is_static(), "static defaults not allowed");
    }
  }
}
void LinkResolver::lookup_instance_method_in_klasses(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) {
  Method* result_oop = klass->uncached_lookup_method(name, signature, Klass::find_overpass);
  result = methodHandle(THREAD, result_oop);
  while (!result.is_null() && result->is_static() && result->method_holder()->super() != NULL) {
    KlassHandle super_klass = KlassHandle(THREAD, result->method_holder()->super());
    result = methodHandle(THREAD, super_klass->uncached_lookup_method(name, signature, Klass::find_overpass));
  }

  if (klass->oop_is_array()) {
     
    return;
  }

  if (result.is_null()) {
    Array<Method*>* default_methods = InstanceKlass::cast(klass())->default_methods();
    if (default_methods != NULL) {
      result = methodHandle(InstanceKlass::find_method(default_methods, name, signature));
      assert(result.is_null() || !result->is_static(), "static defaults not allowed");
    }
  }
}