felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1556575 - /felix/trunk/dependencymanager/shell/src/main/java/org/apache/felix/dm/shell/DMCommand.java
Date Wed, 08 Jan 2014 16:46:22 GMT
Author: pderop
Date: Wed Jan  8 16:46:21 2014
New Revision: 1556575

URL: http://svn.apache.org/r1556575
Log:
[FELIX-4352] Detect missing configuration dependency before checking dependency cycles.

Modified:
    felix/trunk/dependencymanager/shell/src/main/java/org/apache/felix/dm/shell/DMCommand.java

Modified: felix/trunk/dependencymanager/shell/src/main/java/org/apache/felix/dm/shell/DMCommand.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/shell/src/main/java/org/apache/felix/dm/shell/DMCommand.java?rev=1556575&r1=1556574&r2=1556575&view=diff
==============================================================================
--- felix/trunk/dependencymanager/shell/src/main/java/org/apache/felix/dm/shell/DMCommand.java
(original)
+++ felix/trunk/dependencymanager/shell/src/main/java/org/apache/felix/dm/shell/DMCommand.java
Wed Jan  8 16:46:21 2014
@@ -628,13 +628,16 @@ public class DMCommand {
         for (ComponentDependencyDeclaration cdd : componentDependencies) {
             if (cdd.getState() == ComponentDependencyDeclaration.STATE_UNAVAILABLE_REQUIRED)
{
                 downDeps++;
+                // Detect missing configuration dependency
+                if (CONFIGURATION.equals(cdd.getType())) {
+                    String bsn = c.getBundleContext().getBundle().getSymbolicName();
+                    return new ComponentId(cdd.getName(), cdd.getType(), bsn);
+                }
+
+                // Detect if the missing dependency is a root cause failure
                 ComponentDeclaration component = getComponentDeclaration(cdd.getName(), downComponents);
                 if (component == null) {
-                    String contextName = null;
-                    if (CONFIGURATION.equals(cdd.getType())) {
-                        contextName = c.getBundleContext().getBundle().getSymbolicName();
-                    }
-                    return new ComponentId(cdd.getName(), cdd.getType(), contextName);
+                    return new ComponentId(cdd.getName(), cdd.getType(), null);
                 }
                 // Detect circular dependency
                 ComponentId componentId = new ComponentId(cdd.getName(), cdd.getType(), null);



Mime
View raw message