[multiple changes]
authorAndrew Haley <aph@redhat.com>
Mon, 2 Apr 2007 16:24:35 +0000 (16:24 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Mon, 2 Apr 2007 16:24:35 +0000 (16:24 +0000)
2007-03-30  Andrew Haley  <aph@redhat.com>

        * javax/management/ObjectName.java: Handle 0-length names.

2007-03-27  Andrew Haley  <aph@redhat.com>

        * javax/management/MBeanServerFactory.java: Use the domain that
        we've been passed, not the fixed string "DefaultDomain".

From-SVN: r123430

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

index 3d3d23fe9d30d0a0b2cfa3c26ccef8caece416cb..280af2ba9236452a4059fe67716fa00758c38331 100644 (file)
@@ -1,3 +1,12 @@
+2007-03-30  Andrew Haley  <aph@redhat.com>
+
+       * javax/management/ObjectName.java: Handle 0-length names.
+
+2007-03-27  Andrew Haley  <aph@redhat.com>
+
+       * javax/management/MBeanServerFactory.java: Use the domain that
+       we've been passed, not the fixed string "DefaultDomain".
+
 2007-03-29  Tom Tromey  <tromey@redhat.com>
 
        PR libgcj/29869:
index 54195635bd26d3997458c5c6b8461b06586e2e97..a8dac948984e75f3433b1b84cb464aeecc88e61c 100644 (file)
@@ -370,7 +370,7 @@ public class MBeanServerFactory
     MBeanServerDelegate delegate = builder.newMBeanServerDelegate();
     if (delegate == null)
       throw new JMRuntimeException("A delegate could not be created.");
-    MBeanServer server = builder.newMBeanServer("DefaultDomain", null, delegate);
+    MBeanServer server = builder.newMBeanServer(domain, null, delegate);
     if (server == null)
       throw new JMRuntimeException("A server could not be created.");
     return server;
index 8259eab02bedd3795917f31e1adb5ddd49e4911a..604205437f31d450d3fd23446a63347e84d32934 100644 (file)
@@ -143,6 +143,9 @@ public class ObjectName
   public ObjectName(String name)
     throws MalformedObjectNameException
   {
+    if (name.length() == 0)
+      name = "*:*";
+
     int domainSep = name.indexOf(':');
     if (domainSep == -1)
       throw new MalformedObjectNameException("No domain separator was found.");
index 4b73417d78c721a769d28b8c518625d9635257ff..d1a09850473a2895a67b75409b1128154e5dcca8 100644 (file)
Binary files a/libjava/classpath/lib/javax/management/MBeanServerFactory.class and b/libjava/classpath/lib/javax/management/MBeanServerFactory.class differ
index 28a3f54fbbff38c2a4ee95d15268b13aeca1d411..313cefcdad28d8ee9d30064c004f3155d756a3c6 100644 (file)
Binary files a/libjava/classpath/lib/javax/management/ObjectName.class and b/libjava/classpath/lib/javax/management/ObjectName.class differ