modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
| 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit e96ce182758719f86364bdc7a2e73c287dddbe4c
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Aug 28 15:22:40 2012 -0500
[BZ 852534] Collapsed maps with null keys should be set to null. Attempting to send
maps with null values to the application server results in validation errors.
diff --git
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
index 8286f17..aad2105 100644
---
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
+++
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
@@ -628,10 +628,14 @@ public class ConfigurationWriteDelegate implements
ConfigurationFacet {
throw new IllegalArgumentException("Member names in a :collapsed map
must end in :0 and :1");
}
- Map<String, Object> resultMap = new HashMap<String, Object>();
- resultMap.put(key, value);
+ if (key != null) {
+ Map<String, Object> resultMap = new HashMap<String, Object>();
+ resultMap.put(key, value);
- return resultMap;
+ return resultMap;
+ } else {
+ return null;
+ }
}
Show replies by date