OSDN Git Service

2007-03-30 Andrew Haley <aph@redhat.com>
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Apr 2007 16:24:35 +0000 (16:24 +0000)
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Apr 2007 16:24:35 +0000 (16:24 +0000)
        * 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".

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

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 3d3d23f..280af2b 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 5419563..a8dac94 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 8259eab..6042054 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 4b73417..d1a0985 100644 (file)
Binary files a/libjava/classpath/lib/javax/management/MBeanServerFactory.class and b/libjava/classpath/lib/javax/management/MBeanServerFactory.class differ
index 28a3f54..313cefc 100644 (file)
Binary files a/libjava/classpath/lib/javax/management/ObjectName.class and b/libjava/classpath/lib/javax/management/ObjectName.class differ