-
Bug
-
Resolution: Fixed
-
P2
-
15, 16, 17, 18
-
b07
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8270759 | 17.0.1 | Yi Yang | P2 | Resolved | Fixed | b03 |
JDK-8270425 | 17 | Yi Yang | P2 | Resolved | Fixed | b31 |
Create on behalf of NekoCaffeine <nekocaffeine@qq.com>
-----
Generated lambda class can not access protected static method of the target class. The following exception is thrown when executing the attached reproducible program:
Exception in thread "main" java.lang.IllegalAccessError: class AccessProtectedStaticMethodFromSuper$B$$Lambda$15/0x0000000800b8ea48 tried to access protected method 'void AccessProtectedStaticMethodFromSuper$A.func()' (AccessProtectedStaticMethodFromSuper$B$$Lambda$15/0x0000000800b8ea48 is in unnamed module of loader AccessProtectedStaticMethodFromSuper$1Loader @71dac704; AccessProtectedStaticMethodFromSuper$A is in unnamed module of loader AccessProtectedStaticMethodFromSuper$1Loader @39ed3c8d)
at AccessProtectedStaticMethodFromSuper.main(AccessProtectedStaticMethodFromSuper.java:51)
This issue is similar toJDK-8254975 with slight differences: generated lambda proxy calls static protected method rather than protected member method.
-----
Generated lambda class can not access protected static method of the target class. The following exception is thrown when executing the attached reproducible program:
Exception in thread "main" java.lang.IllegalAccessError: class AccessProtectedStaticMethodFromSuper$B$$Lambda$15/0x0000000800b8ea48 tried to access protected method 'void AccessProtectedStaticMethodFromSuper$A.func()' (AccessProtectedStaticMethodFromSuper$B$$Lambda$15/0x0000000800b8ea48 is in unnamed module of loader AccessProtectedStaticMethodFromSuper$1Loader @71dac704; AccessProtectedStaticMethodFromSuper$A is in unnamed module of loader AccessProtectedStaticMethodFromSuper$1Loader @39ed3c8d)
at AccessProtectedStaticMethodFromSuper.main(AccessProtectedStaticMethodFromSuper.java:51)
This issue is similar to
- backported by
-
JDK-8270425 Generated lambda class can not access protected static method of target class
-
- Resolved
-
-
JDK-8270759 Generated lambda class can not access protected static method of target class
-
- Resolved
-
- links to
-
Commit openjdk/jdk17/0f547071
-
Commit openjdk/jdk/07e90524
-
Review openjdk/jdk17/245
-
Review openjdk/jdk/4714
(1 links to)