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

    Details

    • Subcomponent:
    • Introduced In Version:
      5.0
    • Resolved In Build:
      b86
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      Verified

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: