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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • 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

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

              Created:
              Updated:
              Resolved: