commit | 6add8d763422b83646fbc78dcb48deaa17561f99 | [log] [tgz] |
---|---|---|
author | Clement Escoffier <clement@apache.org> | Fri Jun 14 17:29:27 2013 +0000 |
committer | Clement Escoffier <clement@apache.org> | Fri Jun 14 17:29:27 2013 +0000 |
tree | d543c8750f37dbf875c13853cb06a64b32439d2e | |
parent | 180d02f51f589d269ac96528d8c15588d0e36994 [diff] |
Fix FELIX-4129 Allow changing the optionality of a dependency at runtime git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1493176 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/util/DependencyModel.java b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/util/DependencyModel.java index 2882464..6d49b9f 100644 --- a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/util/DependencyModel.java +++ b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/util/DependencyModel.java
@@ -803,12 +803,8 @@ 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(); }