felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r988580 - /felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterServiceImpl.java
Date Tue, 24 Aug 2010 14:53:43 GMT
Author: marrs
Date: Tue Aug 24 14:53:43 2010
New Revision: 988580

URL: http://svn.apache.org/viewvc?rev=988580&view=rev
Log:
Filter out certain properties when propagating them (adapters on aspects went wrong as the
aspect properties were copied).

Modified:
    felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterServiceImpl.java

Modified: felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterServiceImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterServiceImpl.java?rev=988580&r1=988579&r2=988580&view=diff
==============================================================================
--- felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterServiceImpl.java
(original)
+++ felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterServiceImpl.java
Tue Aug 24 14:53:43 2010
@@ -25,6 +25,7 @@ import org.apache.felix.dm.Dependency;
 import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.Service;
 import org.apache.felix.dm.ServiceStateListener;
+import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
 
 /**
@@ -63,7 +64,13 @@ public class AdapterServiceImpl extends 
             Properties props = new Properties();
             String[] keys = ref.getPropertyKeys();
             for (int i = 0; i < keys.length; i++) {
-                props.put(keys[i], ref.getProperty(keys[i]));
+                String key = keys[i];
+                if (key.equals(Constants.SERVICE_ID) || key.equals(Constants.SERVICE_RANKING)
|| key.equals(DependencyManager.ASPECT) || key.equals(Constants.OBJECTCLASS)) {
+                    // do not copy these
+                }
+                else {
+                    props.put(key, ref.getProperty(key));
+                }
             }
             if (m_serviceProperties != null) {
                 Enumeration e = m_serviceProperties.keys();



Mime
View raw message