summaryrefslogtreecommitdiff
path: root/javax
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2007-04-07 22:48:02 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2007-04-07 22:48:02 +0000
commitd28b015b9a95d5ed2308e3d67d80422daf676341 (patch)
tree688d5c502fcd41d3c3a6af51eb29bbba3e1c4ae0 /javax
parentd0d037b11697ed1d02fc4a63b2b64660ae148e04 (diff)
downloadclasspath-d28b015b9a95d5ed2308e3d67d80422daf676341.tar.gz
2007-04-07 Andrew John Hughes <gnu_andrew@member.fsf.org>
* javax/management/ObjectName.java: (parse(String)): Fix result of getKeyPropertyListString().
Diffstat (limited to 'javax')
-rw-r--r--javax/management/ObjectName.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/javax/management/ObjectName.java b/javax/management/ObjectName.java
index 421b85a35..257d8c238 100644
--- a/javax/management/ObjectName.java
+++ b/javax/management/ObjectName.java
@@ -190,9 +190,9 @@ public class ObjectName
if (domainSep == -1)
throw new MalformedObjectNameException("No domain separator was found.");
domain = name.substring(0, domainSep);
- propertyListString = name.substring(domainSep + 1);
+ String rest = name.substring(domainSep + 1);
properties = new TreeMap<String,String>();
- String[] pairs = propertyListString.split(",");
+ String[] pairs = rest.split(",");
if (pairs.length == 0 && !isPattern())
throw new MalformedObjectNameException("A name that is not a " +
"pattern must contain at " +
@@ -212,7 +212,11 @@ public class ObjectName
if (properties.containsKey(key))
throw new MalformedObjectNameException("The same key occurs " +
"more than once.");
- properties.put(key, pairs[a].substring(sep + 1));
+ String value = pairs[a].substring(sep+1);
+ properties.put(key, value);
+ propertyListString += key + "=" + value;
+ if (a != (pairs.length - 1))
+ propertyListString += ",";
}
checkComponents();
}