felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1575362 - /felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ComponentImpl.java
Date Fri, 07 Mar 2014 18:42:23 GMT
Author: pderop
Date: Fri Mar  7 18:42:23 2014
New Revision: 1575362

URL: http://svn.apache.org/r1575362
Log:
The getDependencies must return a clone of the current m_dependencies list.

Modified:
    felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ComponentImpl.java

Modified: felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ComponentImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ComponentImpl.java?rev=1575362&r1=1575361&r2=1575362&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ComponentImpl.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ComponentImpl.java Fri
Mar  7 18:42:23 2014
@@ -37,7 +37,7 @@ public class ComponentImpl implements Co
     private static final Class[] VOID = new Class[] {};
 	private final SerialExecutor m_executor = new SerialExecutor(new Logger(null));
 	private ComponentState m_state = ComponentState.INACTIVE;
-	private final List<DependencyContext> m_dependencies = new CopyOnWriteArrayList<>();
+	private final CopyOnWriteArrayList<DependencyContext> m_dependencies = new CopyOnWriteArrayList<>();
 	private final List<ComponentStateListener> m_listeners = new CopyOnWriteArrayList<>();
 	private boolean m_isStarted;
     private final Logger m_logger;
@@ -636,7 +636,7 @@ public class ComponentImpl implements Co
 
 	@Override
 	public List<DependencyContext> getDependencies() {
-		return m_dependencies;
+		return (List<DependencyContext>) m_dependencies.clone();
 	}
 
 	@Override
@@ -942,4 +942,8 @@ public class ComponentImpl implements Co
     public int getState() {
         return (isAvailable() ? ComponentDeclaration.STATE_REGISTERED : ComponentDeclaration.STATE_UNREGISTERED);
     }
+
+    public void ensureNotActive() {
+        // TODO Auto-generated method stub
+    }
 }



Mime
View raw message