-
Bug
-
Resolution: Done
-
Major
-
4.0.0-BETA4
-
None
On jdk9 the Byteman interpreter and compiler use method handles in place of reflection to implement accesses to non-public members or public members of non-exported classes. This fails with an IllegalArgumentException when accessing the majority of classes in the java.* and sun.* package hierarchies because of an over-zealous security check in the Lookup constructor. Bizarrely this failure occurs in cases where reflective access is permitted, a rather unexpected disparity which, unfortunately, only serves to downgrade the attractiveness of method handles as an alternative. This really needs fixing in the JVM (and plans are afoot to make the check much less restrictive). In the interim, Byteman will offer the workaround of falling back to use reflection in cases where this exception is generated. Once the security restrictions converge on a sensible and equal policy for both access mechanisms this fall back will be removed.