JDK-5044823 : An illegal annotation type declaration can be compiled
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-05-10
  • Updated: 2004-05-10
  • Resolved: 2004-05-10
Related Reports
Duplicate :  
Description
###@###.### 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();
  }