Fix imports and pom problem
[nonrtric.git] / policy-agent / src / main / java / org / oransc / policyagent / repository / Services.java
index 789ea2e..35cae71 100644 (file)
@@ -49,9 +49,13 @@ public class Services {
     }
 
     public synchronized void put(Service service) {
+        logger.debug("Put service: " + service.getName());
+        // TODO a threading problem is that this may happend at the same time as someone is iterating (getAll())
+        // This is a generic problem
         services.put(service.getName(), service);
     }
 
+    // TODO the returned value should be unmodifiable if possible
     public synchronized Collection<Service> getAll() {
         return services.values();
     }