< prev index next >

test/runtime/modules/AccessCheckAllUnnamed.java

Print this page

        

*** 55,71 **** ClassLoader this_cldr = AccessCheckAllUnnamed.class.getClassLoader(); // Define a module for p3. m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p3" }); assertNotNull(m1x, "Module should not be null"); ! ModuleHelper.DefineModule(m1x, "9.0", "m1x/there", new String[] { "p3" }); ModuleHelper.AddReadsModule(m1x, jlObject_jlrM); // 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); try { ModuleHelper.AddModuleExportsToAllUnnamed((Module)null, "p2"); throw new RuntimeException("Failed to get the expected NPE for null module"); --- 55,71 ---- ClassLoader this_cldr = AccessCheckAllUnnamed.class.getClassLoader(); // Define a module for p3. m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p3" }); assertNotNull(m1x, "Module should not be null"); ! ModuleHelper.DefineModule(m1x, false, "9.0", "m1x/there", new String[] { "p3" }); ModuleHelper.AddReadsModule(m1x, jlObject_jlrM); // 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); try { ModuleHelper.AddModuleExportsToAllUnnamed((Module)null, "p2"); throw new RuntimeException("Failed to get the expected NPE for null module");
< prev index next >