-
Bug
-
Resolution: Fixed
-
P2
-
8, 9
-
b20
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8046338 | 9 | Vladimir Ivanov | P2 | Closed | Fixed | b19 |
JDK-8048417 | 8u25 | Vladimir Ivanov | P2 | Resolved | Fixed | b05 |
JDK-8053675 | emb-8u26 | Vladimir Ivanov | P2 | Resolved | Fixed | b17 |
Consider the following case:
public class T1 { public int m() { return 2; } }
public class T2 extends T1 { public static int m() { return 1; } }
public class T3 extends T2 { public int m() { return 0; } }
Call site: equivalent of invokespecial T1.m T3
Expected result: T1.m is invoked.
java.lang.InternalError: p1.T1.m()int/invokeSpecial
at java.lang.invoke.MethodHandles$Lookup.getDirectMethodCommon(MethodHandles.java:1631)
at java.lang.invoke.MethodHandles$Lookup.getDirectMethodNoSecurityManager(MethodHandles.java:1602)
at java.lang.invoke.MethodHandles$Lookup.getDirectMethodForConstant(MethodHandles.java:1778)
at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:1727)
at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:442)
at p1.T3.test(Unknown Source)
at p1.T3Caller.test(Unknown Source)
Test case is attached.
ILW = HLH = P2
I = H = incorrect result: error instead of successful invocation
L = L = javac rejects to compile the test case; may be a result of separate compilation though
W = H = no workaround
public class T1 { public int m() { return 2; } }
public class T2 extends T1 { public static int m() { return 1; } }
public class T3 extends T2 { public int m() { return 0; } }
Call site: equivalent of invokespecial T1.m T3
Expected result: T1.m is invoked.
java.lang.InternalError: p1.T1.m()int/invokeSpecial
at java.lang.invoke.MethodHandles$Lookup.getDirectMethodCommon(MethodHandles.java:1631)
at java.lang.invoke.MethodHandles$Lookup.getDirectMethodNoSecurityManager(MethodHandles.java:1602)
at java.lang.invoke.MethodHandles$Lookup.getDirectMethodForConstant(MethodHandles.java:1778)
at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:1727)
at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:442)
at p1.T3.test(Unknown Source)
at p1.T3Caller.test(Unknown Source)
Test case is attached.
ILW = HLH = P2
I = H = incorrect result: error instead of successful invocation
L = L = javac rejects to compile the test case; may be a result of separate compilation though
W = H = no workaround
- backported by
-
JDK-8048417 JSR292: invokeSpecial: InternalError attempting to lookup a method
- Resolved
-
JDK-8053675 JSR292: invokeSpecial: InternalError attempting to lookup a method
- Resolved
-
JDK-8046338 JSR292: invokeSpecial: InternalError attempting to lookup a method
- Closed