JDK-8207137 : Assertion error for package private class while invoking ConstantBootstraps.arrayVarHandle
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 11
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-07-11
  • Updated: 2018-07-12
  • Resolved: 2018-07-12
Related Reports
Duplicate :  
Description
Invoking attached sample code with -esa option results in assertion error.
Comments
$ java -esa cbs Exception in thread "main" java.lang.AssertionError at java.base/sun.invoke.util.VerifyAccess.isSamePackage(VerifyAccess.java:327) at java.base/sun.invoke.util.VerifyAccess.isClassAccessible(VerifyAccess.java:218) at java.base/java.lang.invoke.MethodHandles$Lookup.accessClass(MethodHandles.java:1307) at java.base/java.lang.invoke.ConstantBootstraps.validateClassAccess(ConstantBootstraps.java:355) at java.base/java.lang.invoke.ConstantBootstraps.arrayVarHandle(ConstantBootstraps.java:350) at cbs.main(cbs.java:4)
12-07-2018