Hi all,

I was browsing the source code here (cellar-kubernetes):
https://github.com/apache/karaf-cellar/blob/master/kubernetes/src/main/java/org/apache/karaf/cellar/kubernetes/KubernetesDiscoveryServiceFactory.java#L69

This loop looks "idempotent" to me:
                Properties serviceProperties = new Properties();
                for (Map.Entry entry : serviceProperties.entrySet()) {
                    Object key = entry.getKey();
                    Object value = entry.getValue();
                    serviceProperties.put(key, value);
                }

I guess we want to loop over "properties" instead of "serviceProperties", to 
comply with this best practice:
"As a convention, it is recommended that when a Managed Service is updated, it 
should copy all the properties it does not recognize into the service 
registration properties. This will allow the Configuration Admin service to set 
properties on services which can then be used by other applications."

outlined here 
http://felix.apache.org/apidocs/configadmin/1.2.4/org/osgi/service/cm/ManagedService.html
 ?

Kind regards,
Dario

Reply via email to