JShell: compilation fails if class, method or field is annotated and has modifiers

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: tools
    • b144
    • Verified

      JShell API: compilation fails if class, method or field is annotated and has modifiers: public, protected, static...

      The problem is MaskCommentsAndModifiers erases them incorrectly.

      -> @A public void f() {}
      | Error:
      | repeated modifier
      | @A public void f() {}
      | ^

      --------

      Note: full annotation syntax should be supported.

      Note: int public y -- is treated as int y

            Assignee:
            Robert Field (Inactive)
            Reporter:
            Andrei Eremeev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: