9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /*
27 * @test
28 * @summary class p1.c1 defined in m1 tries to access p2.c2 defined in unnamed module.
29 * @library /testlibrary /test/lib
30 * @modules java.base/jdk.internal.misc
31 * @modules java.base/jdk.internal.module
32 * @compile myloaders/MyDiffClassLoader.java
33 * @compile p2/c2.java
34 * @compile p1/c1.java
35 * @compile p1/c1ReadEdgeDiffLoader.java
36 * @compile p1/c1Loose.java
37 * @build DiffCL_Umod
38 * @run main/othervm -Xbootclasspath/a:. DiffCL_Umod
39 */
40
41 import static jdk.test.lib.Asserts.*;
42
43 import java.lang.module.Configuration;
44 import java.lang.module.ModuleDescriptor;
45 import java.lang.module.ModuleFinder;
46 import java.lang.reflect.Layer;
47 import java.lang.reflect.Module;
48 import java.util.HashMap;
49 import java.util.Map;
50 import java.util.Set;
51 import myloaders.MyDiffClassLoader;
52
53 //
54 // ClassLoader1 --> defines m1 --> packages p1
55 // package p1 in m1 is exported unqualifiedly
56 //
57 // class p1.c1 defined in m1 tries to access p2.c2 defined in
|
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /*
27 * @test
28 * @summary class p1.c1 defined in m1 tries to access p2.c2 defined in unnamed module.
29 * @library /test/lib
30 * @modules java.base/jdk.internal.misc
31 * @modules java.base/jdk.internal.module
32 * @compile myloaders/MyDiffClassLoader.java
33 * @compile p2/c2.java
34 * @compile p1/c1.java
35 * @compile p1/c1ReadEdgeDiffLoader.java
36 * @compile p1/c1Loose.java
37 * @run main/othervm -Xbootclasspath/a:. DiffCL_Umod
38 */
39
40 import static jdk.test.lib.Asserts.*;
41
42 import java.lang.module.Configuration;
43 import java.lang.module.ModuleDescriptor;
44 import java.lang.module.ModuleFinder;
45 import java.lang.reflect.Layer;
46 import java.lang.reflect.Module;
47 import java.util.HashMap;
48 import java.util.Map;
49 import java.util.Set;
50 import myloaders.MyDiffClassLoader;
51
52 //
53 // ClassLoader1 --> defines m1 --> packages p1
54 // package p1 in m1 is exported unqualifiedly
55 //
56 // class p1.c1 defined in m1 tries to access p2.c2 defined in
|