This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FYI: A third javax.management fix


Gary Benson writes:
 > 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.  This patch makes our toString() return
 > the canonical representation.

Here's another couple.  Still not quite enough to run Tomcat, I'm
afraid.

Andrew.


Index: classpath/gnu/javax/management/Server.java
===================================================================
--- classpath/gnu/javax/management/Server.java	(revision 121954)
+++ classpath/gnu/javax/management/Server.java	(working copy)
@@ -1667,9 +1667,12 @@
 					   "MBeanRegistration.");
 	    throw new RuntimeOperationsException(e);
 	  }
+      }
+    if (register != null)
+      {
 	try
 	  {
-	    name = register.preRegister(this, null);
+	    name = register.preRegister(this, name);
 	    if (sm != null)
 	      sm.checkPermission(new MBeanPermission(className, null, name,
 						     "registerMBean"));
Index: classpath/javax/management/ObjectName.java
===================================================================
--- classpath/javax/management/ObjectName.java	(revision 121954)
+++ classpath/javax/management/ObjectName.java	(working copy)
@@ -574,7 +574,7 @@
    */
   public Hashtable getKeyPropertyList()
   {
-    return (Hashtable) Collections.unmodifiableMap(new Hashtable(properties));
+    return new Hashtable(properties);
   }
 
   /**


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]