This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: FYI: A third javax.management fix
- From: Andrew Haley <aph at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Thu, 15 Feb 2007 11:04:44 +0000
- Subject: Re: FYI: A third javax.management fix
- References: <20070215091633.GA6614@redhat.com>
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);
}
/**