Uploaded image for project: 'CCC Migration Project'
  1. CCC Migration Project
  2. CCC-8168789

ModuleReader.list and ModuleFinder.of update

    Details

    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      ModuleReader.list and ModuleFinder.of update

      Problem

      This CCC covers two small updates to the java.lang.module API.

      1. 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.

      2. 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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alanb Alan Bateman
                Reporter:
                alanb Alan Bateman
                Reviewed By:
                Mandy Chung
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: