2007-02-14 Gary Benson <gbenson@redhat.com>
authorgary <gary@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Feb 2007 09:02:38 +0000 (09:02 +0000)
committergary <gary@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Feb 2007 09:02:38 +0000 (09:02 +0000)
* javax/management/ObjectName.java
(toString): Return this item's canonical name.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121989 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/classpath/ChangeLog.gcj
libjava/classpath/javax/management/ObjectName.java
libjava/classpath/lib/javax/management/ObjectName.class

index e50d8f7..75c1c25 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-14  Gary Benson  <gbenson@redhat.com>
+
+       * javax/management/ObjectName.java
+       (toString): Return this item's canonical name.
+
 2007-02-12  Tom Tromey  <tromey@redhat.com>
 
        * java/util/Collections.java (UnmodifiableMap.toArray): Imported
index 573b984..0b18c01 100644 (file)
@@ -1,5 +1,5 @@
 /* ObjectName.java -- Represent the name of a bean, or a pattern for a name.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -716,19 +716,18 @@ public class ObjectName
 
   /**
    * Returns a textual representation of the object name.
-   * The format is unspecified, but it should be expected that
-   * two equivalent object names will return the same string
-   * from this method.
+   *
+   * <p>The format is unspecified beyond that equivalent object
+   * names will return the same string from this method, but note
+   * that Tomcat depends on the string returned by this method
+   * being a valid textual representation of the object name and
+   * will fail to start if it is not.
    *
    * @return a textual representation of the object name.
    */
   public String toString()
   {
-    return getClass().toString() +
-      "[domain = " + domain +
-      ",properties = " + properties +
-      ",propertyPattern = " + propertyPattern +
-      "]";
+    return getCanonicalName();
   }
 
   /**
index 63b44d4..9895cbf 100644 (file)
Binary files a/libjava/classpath/lib/javax/management/ObjectName.class and b/libjava/classpath/lib/javax/management/ObjectName.class differ