8154956: Module system implementation refresh (4/2016)

Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Reviewed-by: acorn, jiangli, ccheung, hseigel
This commit is contained in:
Alan Bateman 2016-05-03 09:09:20 +01:00
parent 2a6a1d7c8e
commit a503db18fb
45 changed files with 998 additions and 538 deletions

View file

@ -48,26 +48,27 @@ public class JVMAddReadsModule {
assertNotNull(to_module, "Module should not be null");
ModuleHelper.DefineModule(to_module, "9.0", "to_module/here", new String[] { "yourpackage" });
// Null from_module argument, expect an NPE
// Null from_module argument, expect NPE
try {
ModuleHelper.AddReadsModule(null, to_module);
throw new RuntimeException("Failed to get the expected NPE");
} catch(NullPointerException e) {
} catch (NullPointerException e) {
// Expected
}
// Null to_module argument, do not expect an NPE
// Null to_module argument, expect NPE
try {
ModuleHelper.AddReadsModule(from_module, null);
} catch(NullPointerException e) {
throw new RuntimeException("Unexpected NPE was thrown");
} catch (NullPointerException e) {
// Expected
}
// Null from_module and to_module arguments, expect an NPE
// Null from_module and to_module arguments, expect NPE
try {
ModuleHelper.AddReadsModule(null, null);
throw new RuntimeException("Failed to get the expected NPE");
} catch(NullPointerException e) {
} catch (NullPointerException e) {
// Expected
}