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

CONFORMANCE: no compiler error if method in annotation type is override-equivalent to clone(), etc.

XMLWordPrintable

    • 5.0
    • b86
    • x86
    • windows_xp
    • Verified

      JLS3, Chapter 9 Interfaces. 9.6 Annotation Types
      "It is also a compile-time error if any method declared in an annotation type has a signature that is override-equivalent to that of any public or protected method declared in class Object or in the interface annotation.Annotation."

      If we write the following code
      @interface test {
         int clone();
      }
      javac doesn't complain, when it should. Same situation with the other Object's protected method finilize().
      We have two failures on JCK6.0 b20 QAC build:
          lang/ANNOT/annot050/annot05001m7/annot05001m7.html
          lang/ANNOT/annot050/annot05001m8/annot05001m8.html

            ahe Peter Ahe
            vrudomet Victor Rudometov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: