FELIX-4990 : Only first factoy configuration is used
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1693990 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java b/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
index 9239c82..930973e 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
@@ -95,8 +95,10 @@
}
}
- // ---------- BaseConfigurationSupport overwrites
-
+ /**
+ * The return value is only relevant for the call from {@link #configurationEvent(ConfigurationEvent)}
+ * in the case of a deleted configuration which is not a factory configuration!
+ */
public boolean configureComponentHolder(final ComponentHolder<?> holder)
{
@@ -127,9 +129,9 @@
bundleContext.getBundle() );
if ( !factory.isEmpty() )
{
+ boolean created = false;
for ( Configuration config: factory )
{
- boolean created = false;
Activator.log( LogService.LOG_DEBUG, null,
"Configuring holder {0} with factory configuration {1}", new Object[] {
holder, config }, null );
@@ -142,10 +144,10 @@
config.getProperties(),
changeCount );
}
- if ( !created )
- {
- return false;
- }
+ }
+ if ( !created )
+ {
+ return false;
}
}
else