8165896: Use "open" flag from JVM_DefineModule to export all module packages

Implemented VM side of open modules, which export all their packages unqualifiedly. Automatic modules and unnamed modules are treated internally as open modules.

Reviewed-by: alanb, hseigel, lfoltan
This commit is contained in:
Rachel Protacio 2017-04-24 12:08:28 -04:00
parent f9e13c6d3f
commit 9947f147f6
28 changed files with 205 additions and 93 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -48,7 +48,7 @@ public class LoadUnloadModuleStress {
MyClassLoader cl = new MyClassLoader();
Object module = ModuleHelper.ModuleObject("mymodule", cl, new String [] {"PackageA"});
assertNotNull(module);
ModuleHelper.DefineModule(module, "9.0", "mymodule", new String[] { "PackageA" });
ModuleHelper.DefineModule(module, false, "9.0", "mymodule", new String[] { "PackageA" });
clweak = new WeakReference<>(cl);
return module;
}