spring-loaded
spring-loaded copied to clipboard
Crash if jdk8 interface with default methods implemented by abstract class
Crash if jdk8 interface with default methods implemented by abstract class.
public interface I {
public default void testI() {}
}
public abstract class IA implements I {
}
public class A extends IA {
}
public class B implements I {
}
I b = new B();
b.testI(); //OK
I a = new A();
a.testI(); //crash
Error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000000000000, pid=7987, tid=139937903687424
#
# JRE version: Java(TM) SE Runtime Environment (8.0_65-b17) (build 1.8.0_65-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.65-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C 0x0000000000000000
Yes, I don't think any work has been done to recognize or deal with default methods yet.