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

The module-infos for --release data do not contain pre-set versions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 22
    • 22
    • tools
    • b26

    Description

      Consider a simple module, like:
      ---
      module test {}
      ---

      And compile it with JDK 22 and JDK 21 using:
      javac --release 21

      The results of the compilations will differ: when compiling with JDK 21, the mandated java.base dependency will get a version, possibly like "21-internal". When compiling with JDK 22, the version of the java.base dependency will be empty.

      Even though the compilation with different versions of JDK may not lead to the same classfiles, the difference in recorded module versions seem unnecessary and wrong. Preferably, the recorded version should be simply "21" in both these cases.

      Attachments

        Issue Links

          Activity

            People

              jlahoda Jan Lahoda
              jlahoda Jan Lahoda
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: