You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pd...@apache.org on 2015/11/22 19:40:55 UTC

svn commit: r1715672 - in /felix/trunk/dependencymanager: org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java release/resources/changelog.txt

Author: pderop
Date: Sun Nov 22 18:40:55 2015
New Revision: 1715672

URL: http://svn.apache.org/viewvc?rev=1715672&view=rev
Log:
[FELIX-5113] - Remove useless wrong test in ConfigurationDependencyImpl.

Modified:
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java
    felix/trunk/dependencymanager/release/resources/changelog.txt

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java?rev=1715672&r1=1715671&r2=1715672&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java Sun Nov 22 18:40:55 2015
@@ -203,14 +203,11 @@ public class ConfigurationDependencyImpl
         // If this is initial settings, or a configuration update, we handle it synchronously.
         // We'll conclude that the dependency is available only if invoking updated did not cause
         // any ConfigurationException.
-        Object[] instances = m_component.getInstances();
-        if (instances != null) {
-            try {
-                invokeUpdated(settings);
-            } catch (ConfigurationException e) {
-                logConfigurationException(e);
-                throw e;
-            }
+        try {
+            invokeUpdated(settings); // either the callback instance or the component instances, if available.
+        } catch (ConfigurationException e) {
+            logConfigurationException(e);
+            throw e;
         }
         
         // At this point, we have accepted the configuration.
@@ -249,7 +246,7 @@ public class ConfigurationDependencyImpl
             break;
         case REMOVED:
             // The state machine is stopping us. We have to invoke updated(null).
-            // Reset for the next time the state machine calls invokeAdd
+            // Reset for the next time the state machine calls invokeCallback(ADDED)
             m_updateInvokedCache.set(false);
             break;
         default:

Modified: felix/trunk/dependencymanager/release/resources/changelog.txt
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/release/resources/changelog.txt?rev=1715672&r1=1715671&r2=1715672&view=diff
==============================================================================
--- felix/trunk/dependencymanager/release/resources/changelog.txt (original)
+++ felix/trunk/dependencymanager/release/resources/changelog.txt Sun Nov 22 18:40:55 2015
@@ -12,6 +12,7 @@ Release Notes - Felix - Version org.apac
     * [FELIX-5054] - Clean-up instance bound dependencies when component is destroyed
     * [FELIX-5055] - Upgrade DM to BndTools 3.0.0
     * [FELIX-5104] - Call a conf dependency callback Instance with an instantiated component
+    * [FELIX-5113] - Remove useless wrong test in ConfigurationDependencyImpl
 
 Release Notes - Felix - Version  org.apache.felix.dependencymanager-r5:
 ======================================================================