mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 02:24:40 +02:00
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:
parent
ade6d7cd18
commit
8a5f33bd16
3 changed files with 3 additions and 26 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue