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

ModuleLayer::parents should return an unmodifiable list

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 15
    • 9, 15
    • core-libs
    • None

    Description

      If a module layer is created with the defineModulesXXXX methods then the "parents" method that returns the list of parent layers returns a modifiable list, it should return an unmodifiable list. This bug does not impact the boot layer (or the empty layer). Configuration::parents does not have this issue.

      As part of this, we should clarify the ModuleLayer.parents() to make it clear that the returned list is unmodifiable. Configuration::parents javadoc is already clear that the returned list is unmodifiable.


      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: