summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Negrea <snegrea@redhat.com>2012-08-28 20:22:40 (GMT)
committerStefan Negrea <snegrea@redhat.com>2012-08-28 20:22:40 (GMT)
commite96ce182758719f86364bdc7a2e73c287dddbe4c (patch)
tree5cc82d9680c2750ca9349bc8544d4eaf56f67f04
parent9fda60f21e354f3b33a1ecf85b81cae19e0af1af (diff)
downloadrhq-e96ce182758719f86364bdc7a2e73c287dddbe4c.zip
rhq-e96ce182758719f86364bdc7a2e73c287dddbe4c.tar.gz
rhq-e96ce182758719f86364bdc7a2e73c287dddbe4c.tar.xz
[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.
-rw-r--r--modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java10
1 files changed, 7 insertions, 3 deletions
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;
+ }
}