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

An illegal annotation type declaration can be compiled

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 5.0
    • tools
    • x86
    • windows_xp


      ###@###.### 2004-05-10

      J2SE Version (please include all output from java -version flag):
        java version "1.5.0-beta2"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b48)
        Java HotSpot(TM) Client VM (build 1.5.0-beta2-b48, mixed mode)

      Does this problem occur on J2SE 1.3.x or 1.4.x? Yes / No (pick one)
        N/A

      Operating System Configuration Information (be specific):
        Windows XP

      Hardware Configuration Information (be specific):
        Pentium 4, 1.5GHz, 512MB memory

      Bug Description:
        An illegal annotation type declaration can be compiled.

      Steps to Reproduce (be specific):
        According to the JSR175 "Public Draft Specification", the following
        declaration is illegal, but the current compiler just compile it
        without any error or warning.

        public @interface SelfRef {
          SelfRef value();
        }

            gafter Neal Gafter (Inactive)
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: