In 1.6, ObjectNames may have wildcards in their value fields. This allows our implementation to support this.
Changelog: 2007-04-07 Andrew John Hughes <[EMAIL PROTECTED]> * javax/management/ObjectName.java: (checkComponents()): Separate value and key illegal characters to allow value wildcards. -- 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.12 diff -u -3 -p -u -r1.12 ObjectName.java --- javax/management/ObjectName.java 7 Apr 2007 09:20:10 -0000 1.12 +++ javax/management/ObjectName.java 7 Apr 2007 11:13:37 -0000 @@ -282,16 +282,17 @@ public class ObjectName if (domain.indexOf('\n') != -1) throw new MalformedObjectNameException("The domain includes a newline " + "character."); - char[] chars = new char[] { ':', ',', '*', '?', '=' }; + char[] keychars = new char[] { ':', ',', '*', '?', '=' }; + char[] valchars = new char[] { ':', ',', '=' }; Iterator i = properties.entrySet().iterator(); while (i.hasNext()) { Map.Entry entry = (Map.Entry) i.next(); String key = (String) entry.getKey(); - for (int a = 0; a < chars.length; ++a) - if (key.indexOf(chars[a]) != -1) + for (int a = 0; a < keychars.length; ++a) + if (key.indexOf(keychars[a]) != -1) throw new MalformedObjectNameException("A key contains a '" + - chars[a] + "' " + + keychars[a] + "' " + "character."); String value = (String) entry.getValue(); int quote = value.indexOf('"'); @@ -312,10 +313,10 @@ public class ObjectName "a '\"' character."); else { - for (int a = 0; a < chars.length; ++a) - if (value.indexOf(chars[a]) != -1) + for (int a = 0; a < valchars.length; ++a) + if (value.indexOf(valchars[a]) != -1) throw new MalformedObjectNameException("A value contains " + - "a '" + chars[a] + "' " + + "a '" + valchars[a] + "' " + "character."); } }
signature.asc
Description: Digital signature