-
CSR
-
Resolution: Approved
-
P3
-
minimal
-
Java API
-
SE
Summary
ModuleReader.list and ModuleFinder.of update
Problem
This CCC covers two small updates to the java.lang.module API.
ModuleReader provides access to the content of a module but does not define a method to enumerate all resources in the module. The JCK signature test is one potential user of this API.
ModuleFinder.of(Path...) needs a number of clarifications and changes to specify how it determines the set of packages for an automatic module and also how some error cases are handled when deriving the module descriptor for an automatic module.
Solution
Add list method to ModuleReader.
Update the javadoc for ModuleFinder.of(Path...) to change and clarify a number of points on how it derives the module descriptor for an automatic module, specifically:
(a) The set of packages is changed to be based on all resources in the JAR file, not just .class files.
(b) Make it clearer how services configuration files (META-INF/services files) are handled.
(c) Make it clear that a .class file in the top-level directory of the JAR file leads to FindException.
Specification
See attached specdiffs.
- csr for
-
JDK-8168789 ModuleReader.list and ModuleFinder.of update
- Resolved
- relates to
-
CCC-8142968 Module System implementation
- Closed