On 08/07/2016 22:42, Paul Benedict wrote:

:

2) Allow layers to control if non-exported types can be reflected. Perhaps
the JDK sets its own layers to "false", but Containers and what they deploy
can be separately configured, each.


A container or anything else doing dynamic configuration today provides the module finders and so gets an opportunity to re-write module descriptors if it really wants to. So if someone really wants every module in the configuration to export every package then it is possible. It's a bit of effort of course but it seems better than introducting inconsistencies into how core reflection does access checks vs. the VM and method handles.

-Alan

Reply via email to