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

svn commit: r1147659 - /felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java

Author: clement
Date: Sun Jul 17 15:41:22 2011
New Revision: 1147659

URL: http://svn.apache.org/viewvc?rev=1147659&view=rev
Log:
Fixed FELIX-3036
The iPOJO Extender now tries to use the IPOJO-Components header if the bundle does not contain the iPOJO-Components header in its bundle manifest.

Modified:
    felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java

Modified: felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java?rev=1147659&r1=1147658&r2=1147659&view=diff
==============================================================================
--- felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java (original)
+++ felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java Sun Jul 17 15:41:22 2011
@@ -85,6 +85,14 @@ public class Extender implements Synchro
     private static final String IPOJO_HEADER = "iPOJO-Components";
 
     /**
+     * iPOJO Component Type and Instance declaration header
+     * (alternative).
+     * This header was introduced because of BND supporting only header
+     * starting with an uppercase.
+     */
+    private static final String IPOJO_HEADER_ALT = "IPOJO-Components";
+
+    /**
      * iPOJO Extension declaration header.
      */
     private static final String IPOJO_EXTENSION = "IPOJO-Extension";
@@ -219,6 +227,11 @@ public class Extender implements Synchro
 
         // Check bundle
         String header = (String) dict.get(IPOJO_HEADER);
+        // Check the alternative header
+        if (header == null) {
+            header = (String) dict.get(IPOJO_HEADER_ALT);
+        }
+
         if (header != null) {
             try {
                 parse(bundle, header);