[9] Review request: 8177566: FX user module gets IllegalAccessException from sun.reflect.misc.Trampoline

Mandy Chung mandy.chung at oracle.com
Tue May 2 20:59:13 UTC 2017

Hi Kevin,

> On May 1, 2017, at 5:21 PM, Kevin Rushforth <Kevin.Rushforth at oracle.COM> wrote:
> This review is being cross-posted to both openjfx-dev and jigsaw-dev.
> Please review the proposed fix for:
> https://bugs.openjdk.java.net/browse/JDK-8177566
> http://cr.openjdk.java.net/~kcr/8177566/webrev.00/complete-webrev/

First pass of comment:

 196         try {
 197             return (ReadOnlyProperty<T>)MethodHelper.invoke(propertyGetter, bean, (Object[])null);

 198         } catch (Exception ex) {
 199             throw new RuntimeException(ex);
 200         }

Do you have an example exception thrown if the package is not
open to javafx.base?  IAE is thrown by MethodHelper.invoke.
Are you detecting this and throw an exception with friendlier

  45     public static Object invoke(Method m, Object obj, Object[] params)

To avoid 3 ModuleHelper classes, the invoke method can take
the callerModule argument to replace this line: 
  56         final Module thisModule = MethodHelper.class.getModule();

  There are a few other public methods which I think JavaFX doesn’t
  need and can be removed.


More information about the jigsaw-dev mailing list