On 15/06/2017 15:28, Mandy Chung wrote:
On Jun 15, 2017, at 12:34 AM, Alan Bateman <alan.bate...@oracle.com> wrote:

java/lang/Module.java
  901     void implAddOpensToAllUnnamed(Iterator<String> iterator) {
  902         if (jdk.internal.misc.VM.isModuleSystemInited()) {
  903             iterator.forEachRemaining(pn ->
  904                 implAddExportsOrOpens(pn, ALL_UNNAMED_MODULE, true, 
true));
  905             return;
  906         }

AFAICT this should only be called during module system initialization.
When will this method be called after initPhase 2?
It's for use during startup (initPhase2) only. If called later then it works as 
if the module somehow reflectively opened the packages to all unnamed modules. 
I wouldn't object to changing it to throwing an exception (assuming that is 
what you are thinking) as the JDK doesn't have any use for this after 
initPhase2.
Yes this is what I am thinking.  This method should catch when it’s called 
which is not expected.

Okay, I can do that.

-Alan

Reply via email to