Javac issues different error messages for the modifiers of the requires directive

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 24
    • Affects Version/s: 24
    • Component/s: tools
    • None
    • b26

      given code like:

      module test {
          requires static static java.sql;
          requires transitive transitive java.desktop;
      }

      javac prints:

      module-info.java:2: error: repeated modifier
          requires static static java.sql;
                          ^
      module-info.java:3: error: ';' expected
          requires transitive transitive java.desktop;
                                        ^
      module-info.java:3: error: module directive keyword or '}' expected
          requires transitive transitive java.desktop;
                                         ^
      3 errors

      I think that the error for modifier `transitive` should be the same as for `static`

            Assignee:
            Vicente Arturo Romero Zaldivar
            Reporter:
            Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: