Layer.defineModulesXXX with a Configuration containing java.base throws undocumented exception

XMLWordPrintable

    • minimal
    • This is new API for Java SE 9 so no compatibility impact
    • Java API
    • SE

      Summary

      Layer.defineModulesXXX with a Configuration containing java.base throws undocumented exception

      Problem

      The module "java.base" is the core module in Java SE. It can only exist in the boot Layer.

      The current API to create module Layer (java.lang.reflect.Layer) doesn't currently specify this restriction and so trips up JCK tests that attempt to create custom module Layers with a module named "java.base".

      Solution

      Clarify the spec to make so that it clear that java.base is only allowed in the boot Layer.

      Update the Layer::defineModulesXXXX methods to define the exception thrown when attempting to create a custom layer containing "java.base".

      Specification

      See attached specdiffs.
      

            Assignee:
            Alan Bateman
            Reporter:
            Alan Bateman
            Dmitry Bessonov, Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: