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

SlingAnnotationProcessor.processSlingFilter cannot deal with multiple scopes

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: scr annotations 1.9.8
    • Fix Version/s: scr annotations 1.9.10
    • Component/s: SCR Tooling
    • Labels:
      None

      Description

      If an annotation like this is used:

      @SlingFilter(generateComponent = false, generateService = true, order = -700, scope = { SlingFilterScope.REQUEST, SlingFilterScope.ERROR })
      

      the generated XML will contain only the first scope (i.e. request)

      ....
              <service servicefactory="false">
                  <provide interface="javax.servlet.Filter"/>
              </service>
              <property name="service.ranking" type="Integer" value="-700"/>
              <property name="sling.filter.scope" value="REQUEST"/>
      

      The problem is https://github.com/apache/felix/blob/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/processing/SlingAnnotationProcessor.java#L191. That can only deal with single values.
      Rather it should use the helper method generateStringPropertyDescriptor, like it is done for all the multivalue fields of the annotation @SlingServlet.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cziegeler Carsten Ziegeler
                Reporter:
                kwin Konrad Windszus
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: