Here's another one.  Verified by comparison with the Sun JDK.

Andrew.


2007-03-30  Andrew Haley  <[EMAIL PROTECTED]>

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

Index: ObjectName.java
===================================================================
--- ObjectName.java     (revision 123156)
+++ ObjectName.java     (working copy)
@@ -143,6 +143,9 @@
   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.");

-- 
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 
1TE, UK
Registered in England and Wales No. 3798903

Reply via email to