mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8172288: Fix Jigsaw related module/package error messages and throw correct exceptions
Reword error messages and throw IllegalStateExceptions where appropriate Reviewed-by: alanb, acorn, lfoltan, gtriantafill
This commit is contained in:
parent
235f29814a
commit
c95329970d
3 changed files with 44 additions and 37 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -84,11 +84,11 @@ public class JVMAddModulePackage {
|
|||
// Expected
|
||||
}
|
||||
|
||||
// Existing package, expect an IAE
|
||||
// Existing package, expect an ISE
|
||||
try {
|
||||
ModuleHelper.AddModulePackage(module1, "yourpackage");
|
||||
throw new RuntimeException("Failed to get the expected IAE");
|
||||
} catch(IllegalArgumentException e) {
|
||||
throw new RuntimeException("Failed to get the expected ISE");
|
||||
} catch(IllegalStateException e) {
|
||||
// Expected
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue