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

Annotation equals method will fail when presented with nonstandard annotation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 5.0
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b40
    • CPU:
      generic
    • OS:
      generic

      Description

      The equals method for annotations read at runtime runs this code (in AnnotationInvocationHandler.java):

      188 if (v2.getClass() != type)
      189 return false;

      If v2 is not a normal (dynamic proxy) annotation, this will not work.

        Attachments

          Activity

            People

            Assignee:
            jjb Josh Bloch
            Reporter:
            jjb Josh Bloch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: