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

ResolvedModule::reads includes self when configuration contains two or more automatic modules

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • 9, 22
    • core-libs
    • None

      The readability relation is reflexive, every module reads itself. Does the set returned by ResolvedModule::reads include itself? The original intention was the set returned by this method not include itself (the method is specified to allow the empty set be returned). If a configuration consists solely of explicit modules (or more generally at most one automatic module) then the set returned by the modules in the configuration do not include self. However, if there are two or more automatic modules in the configuration then the set returned by the reads method does include self. This issue came up while looking at the scalability issue in JDK-8314986.

      The specification for ResolvedModule:: read should be clarified that the set does not include itself and the implication changed to align with this. It would be incompatible change to specify it the other other, e.g. code that uses this method to draw a DAG would go into a loop if there was a self-loop for example.

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

              Created:
              Updated:
              Resolved: