Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-5543

Component property types must implement java.lang.annotation.Annotation methods properly

    XMLWordPrintableJSON

Details

    Description

      Currently component property types only implement one getter method for each element. The methods toString(), equals(), hashCode() and annotationType are not implemented properly (i.e. all return just null). This violates JLS 9.6 (https://docs.oracle.com/javase/specs/jls/se7/html/jls-9.html#jls-9.6).

      The direct superinterface of an annotation type is always java.lang.annotation.Annotation.

      The component property type needs to implement java.lang.annotation.Annotation and all its methods properly. The current implementation is clearly violating the contract of the java.lang.annotation.Annotation.
      For that the Annotations#toObject(...) needs to be adjusted in https://github.com/apache/felix/blob/trunk/scr/src/main/java/org/apache/felix/scr/impl/inject/Annotations.java#L41.

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: