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

error message bug: interface is not a modifier

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Won't Fix
    • Affects Version/s: 1.3.0, 1.4.0
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_9

      Description



      Name: ssT124754 Date: 04/04/2001


      java version "1.3.0_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
      Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)


      This is a minor bug; the error message given when accidentally declaring an
      interface inside of a block is wrong, since the keyword interface is never
      syntactically a modifier.

      class Hello {
        void foo() {
          interface I {}
        }
      }

      Hello.java:3: modifier interface not allowed here
          interface I {}
          ^
      1 error

      Instead, it should be something along the lines of:
      Hello.java:3: keyword interface not allowed here
      (Review ID: 120175)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gafter Neal Gafter
              Reporter:
              ssultanasunw Shaheen Sultana (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: