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 2014/03/02 23:45:39 UTC
svn commit: r1573386 -
/felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/DependencyImpl.java
Author: pderop
Date: Sun Mar 2 22:45:39 2014
New Revision: 1573386
URL: http://svn.apache.org/r1573386
Log:
pass autoConfig flag in constructor
Modified:
felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/DependencyImpl.java
Modified: felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/DependencyImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/DependencyImpl.java?rev=1573386&r1=1573385&r2=1573386&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/DependencyImpl.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/DependencyImpl.java Sun Mar 2 22:45:39 2014
@@ -1,6 +1,7 @@
package dm.impl;
import java.util.Dictionary;
+import java.util.Iterator;
import java.util.concurrent.ConcurrentSkipListSet;
import dm.ComponentDependencyDeclaration;
@@ -28,7 +29,12 @@ public class DependencyImpl implements D
// actually injected (auto config is on for it)
protected final ConcurrentSkipListSet<Event> m_dependencies = new ConcurrentSkipListSet();
- public DependencyImpl() {
+ public DependencyImpl() {
+ this(true);
+ }
+
+ public DependencyImpl(boolean autoConfig) {
+ m_autoConfig = autoConfig;
}
public DependencyImpl(DependencyImpl prototype) {
@@ -98,7 +104,7 @@ public class DependencyImpl implements D
}
m_component.handleChange();
}
-
+
protected void removeDependency(Event e) {
// First check if we are about to become unavailable, but don't remove the dependency from our list now.
m_available = !(m_dependencies.contains(e) && m_dependencies.size() == 1);