You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by gn...@apache.org on 2014/07/22 17:51:21 UTC

svn commit: r1612595 - /felix/trunk/bundleplugin/src/main/resources/org/apache/felix/bundleplugin/scr.xsl

Author: gnodet
Date: Tue Jul 22 15:51:21 2014
New Revision: 1612595

URL: http://svn.apache.org/r1612595
Log:
[FELIX-4576] Bad Require-Capability generation when the SCR target filter has no parentheses

Modified:
    felix/trunk/bundleplugin/src/main/resources/org/apache/felix/bundleplugin/scr.xsl

Modified: felix/trunk/bundleplugin/src/main/resources/org/apache/felix/bundleplugin/scr.xsl
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/resources/org/apache/felix/bundleplugin/scr.xsl?rev=1612595&r1=1612594&r2=1612595&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/resources/org/apache/felix/bundleplugin/scr.xsl (original)
+++ felix/trunk/bundleplugin/src/main/resources/org/apache/felix/bundleplugin/scr.xsl Tue Jul 22 15:51:21 2014
@@ -68,7 +68,14 @@
             </xsl:choose>
             <xsl:choose>
                 <xsl:when test="@target">
-                    <xsl:value-of select="concat('filter:=&quot;(&amp;(objectClass=', @interface, ')', @target, ')&quot;')"/>
+                    <xsl:choose>
+                        <xsl:when test="starts-with(@target, '(')">
+                            <xsl:value-of select="concat('filter:=&quot;(&amp;(objectClass=', @interface, ')', @target, ')&quot;')"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="concat('filter:=&quot;(&amp;(objectClass=', @interface, ')(', @target, '))&quot;')"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
                 </xsl:when>
                 <xsl:otherwise>
                     <xsl:value-of select="concat('filter:=&quot;(objectClass=', @interface, ')&quot;')"/>