felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r947775 - /felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ConfigurationDependencyImpl.java
Date Mon, 24 May 2010 20:02:37 GMT
Author: pderop
Date: Mon May 24 20:02:37 2010
New Revision: 947775

URL: http://svn.apache.org/viewvc?rev=947775&view=rev
Log:
Don't throw a ConfigurationException when the updated callback method does not exist.
Indeed, throwing a ConfigurationException cause a serious problem when adding a ConfigurationDependency
in
in an aspect (or adapter) service, because the aspect (or adapter) internal service does not
implement the updated callback.
Note: we take the same behavior as with ServiceDependency, which also ignores NoSuchMethodException
when the callback method
for injected dependencies is not found in the service impl.


Modified:
    felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ConfigurationDependencyImpl.java

Modified: felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ConfigurationDependencyImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ConfigurationDependencyImpl.java?rev=947775&r1=947774&r2=947775&view=diff
==============================================================================
--- felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ConfigurationDependencyImpl.java
(original)
+++ felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ConfigurationDependencyImpl.java
Mon May 24 20:02:37 2010
@@ -227,6 +227,9 @@ public class ConfigurationDependencyImpl
                     throw new ConfigurationException(null, "Service " + ds + " with " + this.toString()
+ " could not be updated", e.getTargetException());
                 }
             }
+            catch (NoSuchMethodException e) {
+                // if the method does not exist, ignore it
+            }
             catch (Throwable t) {
                 // wrap any other exception as a ConfigurationException.
                 throw new ConfigurationException(null, "Service " + ds + " with " + this.toString()
+ " could not be updated", t);



Mime
View raw message