< prev index next >
src/java.base/share/classes/java/lang/module/Configuration.java
Print this page
*** 110,133 ****
private final Map<String, ResolvedModule> nameToModule;
// module constraints on target
private final String osName;
private final String osArch;
- private final String osVersion;
String osName() { return osName; }
String osArch() { return osArch; }
- String osVersion() { return osVersion; }
private Configuration() {
this.parents = Collections.emptyList();
this.graph = Collections.emptyMap();
this.modules = Collections.emptySet();
this.nameToModule = Collections.emptyMap();
this.osName = null;
this.osArch = null;
- this.osVersion = null;
}
private Configuration(List<Configuration> parents,
Resolver resolver,
boolean check)
--- 110,130 ----
*** 150,160 ****
this.modules = Set.of(moduleArray);
this.nameToModule = Map.ofEntries(nameEntries);
this.osName = resolver.osName();
this.osArch = resolver.osArch();
- this.osVersion = resolver.osVersion();
}
/**
* Resolves a collection of root modules, with this configuration as its
* parent, to create a new configuration. This method works exactly as
--- 147,156 ----
*** 279,313 ****
*
* <p> Resolution may fail with {@code FindException} for the following
* <em>observability-related</em> reasons: </p>
*
* <ul>
* <li><p> A root module, or a direct or transitive dependency, is not
* found. </p></li>
*
* <li><p> An error occurs when attempting to find a module.
* Possible errors include I/O errors, errors detected parsing a module
* descriptor ({@code module-info.class}) or two versions of the same
* module are found in the same directory. </p></li>
*
- * <li><p> A module with the required name is found but the module
- * requires a different {@link ModuleDescriptor#osName() operating
- * system}, {@link ModuleDescriptor#osArch() architecture}, or {@link
- * ModuleDescriptor#osVersion() version} to other modules that have
- * been resolved for the new configuration or modules in the parent
- * configurations. </p></li>
- *
* </ul>
*
* <p> Post-resolution consistency checks may fail with {@code
* ResolutionException} for the following reasons: </p>
*
* <ul>
*
* <li><p> A cycle is detected, say where module {@code m1} requires
* module {@code m2} and {@code m2} requires {@code m1}. </p></li>
*
* <li><p> Two or more modules in the configuration export the same
* package to a module that reads both. This includes the case where a
* module {@code M} containing package {@code p} reads another module
* that exports {@code p} to {@code M}. </p></li>
*
--- 275,307 ----
*
* <p> Resolution may fail with {@code FindException} for the following
* <em>observability-related</em> reasons: </p>
*
* <ul>
+ *
* <li><p> A root module, or a direct or transitive dependency, is not
* found. </p></li>
*
* <li><p> An error occurs when attempting to find a module.
* Possible errors include I/O errors, errors detected parsing a module
* descriptor ({@code module-info.class}) or two versions of the same
* module are found in the same directory. </p></li>
*
* </ul>
*
* <p> Post-resolution consistency checks may fail with {@code
* ResolutionException} for the following reasons: </p>
*
* <ul>
*
* <li><p> A cycle is detected, say where module {@code m1} requires
* module {@code m2} and {@code m2} requires {@code m1}. </p></li>
*
+ * <li><p> A module reads two or more modules with the same name. This
+ * includes the case where a module reads another with the same name as
+ * itself. </p></li>
+ *
* <li><p> Two or more modules in the configuration export the same
* package to a module that reads both. This includes the case where a
* module {@code M} containing package {@code p} reads another module
* that exports {@code p} to {@code M}. </p></li>
*
*** 317,328 ****
* {@code M} reads. </p></li>
*
* </ul>
*
* @implNote In the implementation then observability of modules may depend
! * on referential integrity checks that ensure different builds of tightly
! * coupled modules are not combined in the same configuration.
*
* @param before
* The <em>before</em> module finder to find modules
* @param parents
* The list parent configurations in search order
--- 311,323 ----
* {@code M} reads. </p></li>
*
* </ul>
*
* @implNote In the implementation then observability of modules may depend
! * on referential integrity or other checks that ensure different builds of
! * tightly coupled modules or modules for specific operating systems or
! * architectures are not combined in the same configuration.
*
* @param before
* The <em>before</em> module finder to find modules
* @param parents
* The list parent configurations in search order
< prev index next >