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

follow up of JDK-8144342, add additional test case

XMLWordPrintable

      If 'exports' statement uses package name, then this package should contain file with package declaration due to assertion jigsaw-1.1.2-210:

      If the named package is observable in the current module, then at least one compilation unit containing a declaration of the package must be observable in the current module, or a compile-time error occurs.

      So compile-time error is expected if the only file is empty (has only comments). But no error occurs.

      --------------------------
      Minimal case:

      Directory layout:
      mod1/module-info.java
      mod1/pack1/A.java

      Code:
      A.java:
      {code}
      // No package declaration here.
      {/code}

            vromero Vicente Arturo Romero Zaldivar
            kbarzilovich Konstantin Barzilovich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: