This fixes PR30268 by moving the initialization of the HashMap. 2006-12-22 Andrew John Hughes <[EMAIL PROTECTED]>
PR classpath/30268:
* javax/management/MBeanServerFactory.java:
Initialise map of servers immediately.
(createMBeanServer(String)): Remove map
construction.
--
Andrew :-)
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: javax/management/MBeanServerFactory.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/management/MBeanServerFactory.java,v
retrieving revision 1.3
diff -u -3 -p -u -r1.3 MBeanServerFactory.java
--- javax/management/MBeanServerFactory.java 12 Dec 2006 01:28:43 -0000
1.3
+++ javax/management/MBeanServerFactory.java 22 Dec 2006 20:23:37 -0000
@@ -89,7 +89,7 @@ public class MBeanServerFactory
/**
* The map of registered servers (identifiers to servers).
*/
- private static Map servers;
+ private static final Map servers = new HashMap();
/**
* Private constructor to prevent instance creation.
@@ -158,8 +158,6 @@ public class MBeanServerFactory
if (sm != null)
sm.checkPermission(new MBeanServerPermission("createMBeanServer"));
MBeanServer server = createServer(domain);
- if (servers == null)
- servers = new HashMap();
try
{
ObjectName dn = new
signature.asc
Description: Digital signature
