Review Request: JDK-8173978: Lookup.in should allow teleporting from a lookup class in a named module without dropping all access
mandy.chung at oracle.com
Tue Jul 2 17:20:16 UTC 2019
On 7/2/19 6:59 AM, Alan Bateman wrote:
> This is really good work and fixes several issues left over from JDK
> 9. The compatibility issues (mostly small/advanced) are unfortunate
> but necessary and I hope it won't impact too many things. It will need
> a detail release note once the CSR is done and the changes are in.
The existing usage of `privateLookupIn` I am aware of is using a private
lookup object and do deep reflection in one module. I expect that the
compatibility risk should be low while the library developers/maintainers
are encouraged to test with EA early.
> I've taken several passes over the changes and I don't see anything
> obviously wrong. One minor nit is that the @throws
> IllegalAccessException in accessClass(Class) needs to be updated to
> allow for it to thrown when not accessible from the previous lookup
> class. Also VerifyAccess::isModuleAccessible shouldn't need to if the
> package is exported unconditionally as it is covered by isExported(pn,
> m1) && isExported(pn, m2).
Good point. Fixed.
More information about the core-libs-dev