Author: chris.laprun(a)jboss.com
Date: 2010-03-01 07:39:20 -0500 (Mon, 01 Mar 2010)
New Revision: 1914
Modified:
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/RegistrationPropertiesMapping.java
Log:
- Minor code improvement.
Modified:
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/RegistrationPropertiesMapping.java
===================================================================
---
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/RegistrationPropertiesMapping.java 2010-03-01
12:37:35 UTC (rev 1913)
+++
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/RegistrationPropertiesMapping.java 2010-03-01
12:39:20 UTC (rev 1914)
@@ -50,11 +50,10 @@
public Map<QName, Object> toPropMap()
{
- Map<QName, Object> properties = Collections.emptyMap();
Map<String, String> propMap = getProperties();
if (!propMap.isEmpty())
{
- properties = new HashMap<QName, Object>(propMap.size());
+ Map<QName, Object> properties = new HashMap<QName,
Object>(propMap.size());
for (Map.Entry<String, String> entry : propMap.entrySet())
{
String key = entry.getKey();
@@ -64,9 +63,13 @@
properties.put(QName.valueOf(key), entry.getValue());
}
}
+
+ return properties;
}
-
- return properties;
+ else
+ {
+ return Collections.emptyMap();
+ }
}
public void initFrom(Map<QName, Object> properties)
Show replies by date