RFR 8154587: Resolution fails for default method named 'clone'

harold seigel harold.seigel at oracle.com
Thu Nov 30 16:15:56 UTC 2017


Hi,

Please review this fix for JDK-8154587.  The fix adds additional special 
casing to skip over non-public methods in class java.lang.Object during 
default method and itable processing for interfaces.  These methods need 
to be skipped over because of the interface method resolution rules in 
JVM Spec 9, section 5.4.3.4 
<https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-5.html#jvms-5.4.3.4>:

    3. Otherwise, if the class|Object|declares a method with the name
    and descriptor specified by the interface method reference, which
    has its|ACC_PUBLIC|flag set and does not have its|ACC_STATIC|flag
    set, method lookup succeeds.

Open Webrev: http://cr.openjdk.java.net/~hseigel/bug_8154587/webrev/

JBS Bug:  https://bugs.openjdk.java.net/browse/JDK-8154587

The fix was tested with JCK lang and VM tests, JTReg hotspot and many 
JTReg JDK tests, M5 tier1 - tier5 tests, and JPRT.

Thanks, Harold



More information about the hotspot-runtime-dev mailing list