< prev index next >

test/runtime/modules/AccessCheckUnnamed.java

Print this page

        

*** 54,64 **** ClassLoader this_cldr = AccessCheckUnnamed.class.getClassLoader(); // Define a module for p2. m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); assertNotNull(m2x, "Module should not be null"); ! ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); ModuleHelper.AddReadsModule(m2x, jlObject_jlrM); // p1.c1's ctor tries to call a method in p2.c2. This should fail because // p1 is in the unnamed module and p2.c2 is not unqualifiedly exported. Class p1_c1_class = Class.forName("p1.c1"); --- 54,64 ---- ClassLoader this_cldr = AccessCheckUnnamed.class.getClassLoader(); // Define a module for p2. m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); assertNotNull(m2x, "Module should not be null"); ! ModuleHelper.DefineModule(m2x, false, "9.0", "m2x/there", new String[] { "p2" }); ModuleHelper.AddReadsModule(m2x, jlObject_jlrM); // p1.c1's ctor tries to call a method in p2.c2. This should fail because // p1 is in the unnamed module and p2.c2 is not unqualifiedly exported. Class p1_c1_class = Class.forName("p1.c1");
< prev index next >