8154587: Resolution fails for default method named 'clone'

Make sure default methods with the same names as those in j.l.Object get put in the default methods table where resolution can find them.

Reviewed-by: acorn, lfoltan
This commit is contained in:
Harold Seigel 2017-12-15 11:23:50 -05:00
parent e817cd88c1
commit 47bbcac667
20 changed files with 1478 additions and 33 deletions

View file

@ -177,6 +177,7 @@ void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_co
// instruction somehow links to a non-interface method (in Object).
// In that case, the method has no itable index and must be invoked as a virtual.
// Set a flag to keep track of this corner case.
assert(method->is_public(), "Calling non-public method in Object with invokeinterface");
change_to_virtual = true;
// ...and fall through as if we were handling invokevirtual: