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

Annotations with incorrect retention level should be ignored

XMLWordPrintable

    • b40
    • generic
    • generic

      If an element is annotated with an annotation type whose retention policy is anything other than RUNTIME *at run time*, the spec says that it should be ignored. Currently, it is the case that if an annotation type has a retention policy of RUNTIME when an annotated element is compiled, and the retention policy is changed prior to run time, the annotation can be read at run time (see line 77 of AnnotationParser.java).
       

            jjb Josh Bloch (Inactive)
            jjb Josh Bloch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: