Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-341

IllegalArgumentException may occur on jdk9 when accessing members of java.* and sun.* classes

XMLWordPrintable

      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.

              rhn-engineering-adinn Andrew Dinn
              rhn-engineering-adinn Andrew Dinn
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: