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.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1147659 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java b/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java
index 1b1bcf2..0af2b64 100644
--- a/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java
+++ b/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java
@@ -85,6 +85,14 @@
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 @@
// 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);