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

Module system implementation refresh (2/2017)

XMLWordPrintable

        This issue tracks a refresh of module system API, specifically:

        ModuleDescriptor
        - rename module/openModule/automaticModule to newModule/newOpenModule/newAutomaticModule
        - add ModuleDescriptor.Modifier and modifiers() method, drop isSynthetic

        ModuleDescriptor.Builder
        - change spec so that builder accumulates package as exports/opens/packages are invoked
        - provides and mainClass methods not required to be called with a class name in a named package
        - building an automatic module disallows packages to be declared as exported or open
        - replace 2 x "contains" methods with "packages" method
        - drop provides(String,String) method

        ModuleFinder
        - the set of packages in an automatic module is the set of packages with ".class" files only
        - ignore unrecognized modules in a module directory

        ModuleReader
        - read method should throw OOME if resource too large for a byte buffer

        Configuration
        - rename resolveRequires/resolveRequiresAndUses to resolve/resolveAndBind
        - Change resolve/resolveAndBind to throw FindException (instead of Resolution) for observability related reasons

        jlr.Module
        - getResourceAsStream now specifies that it drops the leading slash. Also specifies that it delegates to ClassLoader::findResource(String, String)
        (so now consistent with Class::getResourceXXX)

        jlr.Accessible
        - add trySetAccessible, canAccess
        - allow setAccessible to static protected methods in super classes

        Class
        - change getPackageName to return a package name for primitive and array classes
        - clarify getResourceXXXX methods to make it clear that they delegate to the ClassLoader::findResource(String, String) method.

        ServiceLoader
        - clarify that the stream spliterator is fail-fast (JDK-8172041)

        MethodHandles.Lookup
        - add Lookup.UNCONDITIONAL, move publicLookup back to java.lang.Object
        - Revise Lookup::in to support teleporting from publicLookup in named modules to other modules

              alanb Alan Bateman
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: