felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r1493176 - /felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/util/DependencyModel.java
Date Fri, 14 Jun 2013 17:29:28 GMT
Author: clement
Date: Fri Jun 14 17:29:27 2013
New Revision: 1493176

URL: http://svn.apache.org/r1493176
Log:
Fix FELIX-4129

Allow changing the optionality of a dependency at runtime

Modified:
    felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/util/DependencyModel.java

Modified: felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/util/DependencyModel.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/util/DependencyModel.java?rev=1493176&r1=1493175&r2=1493176&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/util/DependencyModel.java
(original)
+++ felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/util/DependencyModel.java
Fri Jun 14 17:29:27 2013
@@ -803,12 +803,8 @@ public abstract class DependencyModel {
     public void setOptionality(boolean isOptional) {
         try {
             acquireWriteLockIfNotHeld();
-            if (m_tracker == null) { // Not started ...
-                m_optional = isOptional;
-            } else {
-                // This method releases the exclusive lock
-                computeAndSetDependencyState();
-            }
+            m_optional = isOptional;
+            computeAndSetDependencyState();
         } finally {
             releaseWriteLockIfHeld();
         }



Mime
View raw message