This patch fixes the parsing in ObjectName so that it again doesn't include the wildcard '*' in the return value of getKeyPropertyListString.
Should go in the release, I reckon. Changelog: 2007-04-07 Andrew John Hughes <[EMAIL PROTECTED]> * javax/management/ObjectName.java: (parse(String)): Fix result of getKeyPropertyListString(). -- Andrew :-) Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... }
Index: javax/management/ObjectName.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/management/ObjectName.java,v retrieving revision 1.13 diff -u -3 -p -u -r1.13 ObjectName.java --- javax/management/ObjectName.java 7 Apr 2007 11:19:09 -0000 1.13 +++ javax/management/ObjectName.java 7 Apr 2007 22:44:32 -0000 @@ -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(); }
signature.asc
Description: Digital signature