felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r905398 - /felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandlerDescription.java
Date Mon, 01 Feb 2010 20:06:43 GMT
Author: clement
Date: Mon Feb  1 20:06:43 2010
New Revision: 905398

URL: http://svn.apache.org/viewvc?rev=905398&view=rev
Log:
Fix issue FELIX-2019.
Call get() instead of getProperty() on the property object.

Modified:
    felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandlerDescription.java

Modified: felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandlerDescription.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandlerDescription.java?rev=905398&r1=905397&r2=905398&view=diff
==============================================================================
--- felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandlerDescription.java
(original)
+++ felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandlerDescription.java
Mon Feb  1 20:06:43 2010
@@ -19,6 +19,7 @@
 package org.apache.felix.ipojo.handlers.providedservice;
 
 import java.util.Iterator;
+import java.util.Properties;
 
 import org.apache.felix.ipojo.architecture.HandlerDescription;
 import org.apache.felix.ipojo.metadata.Attribute;
@@ -86,12 +87,18 @@
                 service.addAttribute(new Attribute("state", "unregistered"));
             }
             
-            Iterator iterator = m_providedServices[i].getProperties().keySet().iterator();
+            Properties props = m_providedServices[i].getProperties();
+            Iterator iterator = props.keySet().iterator();
             while (iterator.hasNext()) {
                 Element prop = new Element("property", null);
                 String name = (String) iterator.next();
                 prop.addAttribute(new Attribute("name", name));
-                prop.addAttribute(new Attribute("value", m_providedServices[i].getProperties().getProperty(name)));
+                Object obj = props.get(name);
+                if (obj != null) {
+                    prop.addAttribute(new Attribute("value", obj.toString()));
+                } else {
+                    prop.addAttribute(new Attribute("value", "null"));
+                }
                 service.addElement(prop);
             }
             services.addElement(service);



Mime
View raw message