ModuleLayer::parents should return an unmodifiable list

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 15
    • Affects Version/s: 9, 15
    • Component/s: core-libs
    • None

      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.


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

              Created:
              Updated:
              Resolved: