Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8174823

Module system implementation refresh (3/2017)

    Details

      Backports

        Description

        This issue tracks updating the module system API and implementation in JDK 9. The changes in this update are:

        - ModuleTarget moves from a standard to a JDK-specific class file attribute. This involves small updates to the ModuleDescriptor and Builder APIs, small updates to jlink, and dropping the `jmod --os-version` option.

        - ModuleDescriptor::versionString and ModuleDescriptor.Requires.compiledVersionString to align with the proposal in JSR 376 to allow for alternative module systems that want to use version strings that can't be parsed as a ModuleDescriptor.Version.

        - Update Layer API to specify how qualified exports/opens are reified when creating a layer.

        - Improvements to resource encapsulation to allow the ClassLoader APIs locate directories in module artifacts or exploded modules as resources. This improves the compatibility for code relying on unspecified behavior when it moves from the class path to the module path.

        - Lookup.defineClass as a supported way to defineClasses without needing to break into ClassLoader.defineClass.

        - New `java --permit-illegal-access` option that opens all packages for access that would otherwise fail with IllegalAccessException and InaccessibleObjectException. This option is for migration purposes and makes it easier to identify code that relies on breaking into the JDK modules or is using core reflection anti-patterns. Warnings are printed to stderr then access succeeds because of this command line option (or the existing --add-exports/--add-opens options).

        - Small implementation changes to the module system initialization so that a confusing stack trace is not printed when module system initialization fails.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  alanb Alan Bateman
                  Reporter:
                  alanb Alan Bateman
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  13 Start watching this issue

                  Dates

                  • Due:
                    Created:
                    Updated:
                    Resolved: