8172514: Stop checking for duplicate packages in the JVM_DefineModule() package list

Use GrowableArray append() instead of append_if_missing() to stop searching for duplicates

Reviewed-by: redestad, coleenp, dholmes, gtriantafill
This commit is contained in:
Harold Seigel 2017-03-10 08:04:17 -05:00
parent ade6d7cd18
commit 8a5f33bd16
3 changed files with 3 additions and 26 deletions

View file

@ -105,17 +105,6 @@ public class JVMDefineModule {
}
}
// Duplicates in package list, expect an IAE
m = ModuleHelper.ModuleObject("module.x", cl, new String[] { "mypackage4", "mypackage5" });
try {
ModuleHelper.DefineModule(m, "9.0", "mymodule/here", new String[] { "mypackage4", "mypackage5", "mypackage4" });
throw new RuntimeException("Failed to get IAE for duplicate packages");
} catch(IllegalArgumentException e) {
if (!e.getMessage().contains("Duplicate package name")) {
throw new RuntimeException("Failed to get expected IAE message for duplicate package: " + e.getMessage());
}
}
// Empty entry in package list, expect an IAE
m = ModuleHelper.ModuleObject("module.y", cl, new String[] { "mypackageX", "mypackageY" });
try {