-
Bug
-
Resolution: Fixed
-
P3
-
repo-panama
The binder currently uses MethodHandles::publicLookup in order to fetch a method handle given a reflective Method.
However, since the binder code is in java.base, which doesn't read the user module, a normal MethodHandle::lookup will be unable to get there.
For this reason the code uses MethodHandles::publicLookup instead, which works as long as the method lives in an unconditionally exported package.
While this has been acceptable so far, if the user code also lives in a module and the method to be unreflected lives in a non-exported package, the binder will fail to look that up. Some other solution is thus required.
However, since the binder code is in java.base, which doesn't read the user module, a normal MethodHandle::lookup will be unable to get there.
For this reason the code uses MethodHandles::publicLookup instead, which works as long as the method lives in an unconditionally exported package.
While this has been acceptable so far, if the user code also lives in a module and the method to be unreflected lives in a non-exported package, the binder will fail to look that up. Some other solution is thus required.