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

GenModuleInfoSource tool does not detect missing semicolons

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      The qualified exports starting on lines 306 and 308 of java.base's module-info.java do not have a terminal semi-colon.

      §7.7 of JLS v10 does not indicate it is optional - as such parsers built against the grammar in the JLS either break or consider the java.base module-info invalid.

      In some small manual tests I could not compile module-info.java declaring exports (qualified or not) without a semicolon.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      View source of http://hg.openjdk.java.net/jdk/jdk/file/c96c7d08ae49/src/java.base/share/classes/module-info.java

      Specifically two qualified exports on lines 306-309

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Should be declared as:

          exports sun.security.util.math to

              jdk.crypto.ec;

          exports sun.security.util.math.intpoly to

              jdk.crypto.ec;
      ACTUAL -
      Declared without the semicolons:

          exports sun.security.util.math to

              jdk.crypto.ec

          exports sun.security.util.math.intpoly to

              jdk.crypto.ec

      FREQUENCY : always


            mchung Mandy Chung (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: