-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b47
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085319 | emb-9 | Jan Lahoda | P4 | Resolved | Fixed | team |
JDK-8149318 | 8u101 | Aleksej Efimov | P4 | Resolved | Fixed | b01 |
JDK-8147974 | 8u92 | Aleksej Efimov | P4 | Resolved | Fixed | b04 |
JDK-8155503 | emb-8u101 | Aleksej Efimov | P4 | Resolved | Fixed | b01 |
---
package p1;
class A {
public static void m() { System.out.println("A.m"); }
}
---
package p1;
public class B extends A {
}
---
package p2;
public class Test {
public static void main(String... args) {
p1.B.m(); // ok
Runnable r = p1.B::m; r.run(); // runtime error
}
}
---
$ -> java p2.Test
A.m
Exception in thread "main" java.lang.IllegalAccessError: tried to access class p1.A from class p2.Test
at p2.Test.lambda$MR$main$m$64fce12b$1(Test.java:7)
at p2.Test$$Lambda$1/1160460865.run(Unknown Source)
at p2.Test.main(Test.java:8)
$ -> javap -verbose -private p2.Test
...
public static void main(java.lang.String...);
descriptor: ([Ljava/lang/String;)V
flags: ACC_PUBLIC, ACC_STATIC, ACC_VARARGS
Code:
stack=1, locals=2, args_size=1
0: invokestatic #2 // Method p1/B.m:()V
3: invokedynamic #3, 0 // InvokeDynamic #0:run:()Ljava/lang/Runnable;
8: astore_1
9: aload_1
10: invokeinterface #4, 1 // InterfaceMethod java/lang/Runnable.run:()V
15: return
...
private static void lambda$main$0();
descriptor: ()V
flags: ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=0, locals=0, args_size=0
0: invokestatic #5 // Method p1/A.m:()V
3: return
- backported by
-
JDK-8085319 Method reference uses wrong qualifying type
-
- Resolved
-
-
JDK-8147974 Method reference uses wrong qualifying type
-
- Resolved
-
-
JDK-8149318 Method reference uses wrong qualifying type
-
- Resolved
-
-
JDK-8155503 Method reference uses wrong qualifying type
-
- Resolved
-
- duplicates
-
JDK-8141122 IllegalAccessException using method reference to package-private class via publ
-
- Closed
-
- relates to
-
JDK-8172815 MethodHandles.Lookup.revealDirect performs access checking against wrong class
-
- Open
-
-
JDK-8068253 MethodHandleInfo does not provide the referenced class
-
- In Progress
-