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

Spec clarifications for IllegalArgumentException throwing - ModuleLayer.defineX methods

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 10
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      There is a javadoc only change.
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      The defineModulesXXXX in java.lang.ModuleLayer throw IllegalArgumentException (IAE) when invoked with a configuration (or configurations) that don't match the configuration of the parent layers. The description for when IAE is thrown needs to be clearer.

      Problem

      The current description for when IAE is thrown isn't clear enough to develop conformance tests.

      Solution

      Improve the description for when IAE is thrown.

      Specification

      ModuleLayer defines 3 instance methods to create a module layer with "this" as the parent layer. The description for when IllegalArgumentException is thrown is updated:

      -     *         If the parent of the given configuration is not the configuration
      -     *         for this layer
      +     *         If the given configuration has more than one parent or the parent
      +     *         of the configuration is not the configuration for this layer

      In addition, ModuleLayer defines 3 static methods to a module layer with a list of module layers as parents. The description for when IllegalArgumentException is thrown is updated:

      -     *         If the parent configurations do not match the configuration of
      -     *         the parent layers, including order
      +     *         If the parent(s) of the given configuration do not match the
      +     *         configuration of the parent layers, including order

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alanb Alan Bateman
              Reporter:
              dbessono Dmitry Bessonov
              Reviewed By:
              Dmitry Bessonov, Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: