Fix issue FELIX-2019.
Call get() instead of getProperty() on the property object.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@905398 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandlerDescription.java b/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandlerDescription.java
index df624c1..7298cd9 100644
--- a/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandlerDescription.java
+++ b/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandlerDescription.java
@@ -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);