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

7.7.1: Forbid modifiers on explicit java.base dependence

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 9
    • specification

      The mandated dependence on java.base should be operative in all phases, so 'requires static java.base' should be banned. Since _all_ modules will then depend on java.base _all_ the time, there is no value in a _transitive_ dependence on java.base, so 'requires transitive java.base' should be banned too.

      Accordingly, in addition to the JLS saying what happens if the declaration of a module DOES NOT express a dependence on java.base, the JLS should say that if the declaration of a module DOES express a dependence on java.base, and the module is not itself java.base, then no modifiers are allowed after 'requires'. (Similar rule in the JVMS, for Module.requires[].requires_flags, predicated on a v54 class file version.)

            abuckley Alex Buckley
            abuckley Alex Buckley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: