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

cycle detection depends on ordering of requires directives

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 9, 11
    • Fix Version/s: 11
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b16
    • Verification:
      Verified

      Backports

        Description

        This issue was originally reported here:
        http://mail.openjdk.java.net/pipermail/jigsaw-dev/2018-May/013775.html

        I've been able to duplicate the issue with the following simple test case:

        src/m1/module-info.java:
        module m1 {
            requires m2;
        }

        src/m2/module-info.java:
        module m2 {
            requires m3;
            requires m1;
        }

        src/m3/module-info.java:
        module m3 { }

        This will compile with:
        javac --module-source-path src -d mods $(find src -name module-info.java)

        If the ordering of the requires is changed in m2 then the cycle will be correctly detected.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jlahoda Jan Lahoda
                  Reporter:
                  alanb Alan Bateman
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: