Hi all,
Tomcat is failing with Classpath's javax.management because it assumes
the result of javax.management.ObjectName.toString() is a valid string
representation of the item. Ours isn't, but I guess Sun's and MX4J's
must or they'd be failing too. The javadoc does not specify the
format of the returned string except to say that users can expect it
to be the same for equivalent ObjectNames.
This patch makes our toString() return the canonical representation.
Can anyone (ie Andrew) see any problems with this?
Cheers,
Gary
Index: ChangeLog
===================================================================
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.9104
diff -u -r1.9104 ChangeLog
--- ChangeLog 12 Feb 2007 00:56:29 -0000 1.9104
+++ ChangeLog 12 Feb 2007 14:14:37 -0000
@@ -1,3 +1,8 @@
+2007-02-12 Gary Benson <[EMAIL PROTECTED]>
+
+ * javax/management/ObjectName.java
+ (toString): Return this items canonical name.
+
2007-02-12 Andrew John Hughes <[EMAIL PROTECTED]>
* javax/management/Query.java:
Index: javax/management/ObjectName.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/ObjectName.java,v
retrieving revision 1.4
diff -u -r1.4 ObjectName.java
--- javax/management/ObjectName.java 9 Feb 2007 17:23:30 -0000 1.4
+++ javax/management/ObjectName.java 12 Feb 2007 14:14:37 -0000
@@ -723,11 +723,7 @@
*/
public String toString()
{
- return getClass().toString() +
- "[domain = " + domain +
- ",properties = " + properties +
- ",propertyPattern = " + propertyPattern +
- "]";
+ return getCanonicalName();
}
/**