-
CSR
-
Resolution: Approved
-
P4
-
None
-
minimal
-
There is a javadoc only change.
-
Java API
-
SE
Summary
The defineModulesXXXX in java.lang.ModuleLayer throw IllegalArgumentException (IAE) when invoked with a configuration (or configurations) that don't match the configuration of the parent layers. The description for when IAE is thrown needs to be clearer.
Problem
The current description for when IAE is thrown isn't clear enough to develop conformance tests.
Solution
Improve the description for when IAE is thrown.
Specification
ModuleLayer defines 3 instance methods to create a module layer with "this" as the parent layer. The description for when IllegalArgumentException is thrown is updated:
- * If the parent of the given configuration is not the configuration
- * for this layer
+ * If the given configuration has more than one parent or the parent
+ * of the configuration is not the configuration for this layer
In addition, ModuleLayer defines 3 static methods to a module layer with a list of module layers as parents. The description for when IllegalArgumentException is thrown is updated:
- * If the parent configurations do not match the configuration of
- * the parent layers, including order
+ * If the parent(s) of the given configuration do not match the
+ * configuration of the parent layers, including order
- csr of
-
JDK-8186736 Spec clarifications for IllegalArgumentException throwing - ModuleLayer.defineX methods
-
- Resolved
-