summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Negrea <snegrea@redhat.com>2012-08-29 08:19:50 (GMT)
committerStefan Negrea <snegrea@redhat.com>2012-08-29 08:19:50 (GMT)
commit6bb51618f2a31da1e9890d7c298372396eab12bb (patch)
tree76eda57413d412475112e180c91d96f2902f18cb
parent5cfb0884b064a0ae5d61c25c00b2878afea655ff (diff)
downloadrhq-6bb51618f2a31da1e9890d7c298372396eab12bb.zip
rhq-6bb51618f2a31da1e9890d7c298372396eab12bb.tar.gz
rhq-6bb51618f2a31da1e9890d7c298372396eab12bb.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.
(cherry picked from commit e96ce182758719f86364bdc7a2e73c287dddbe4c)
-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;
+ }
}