User: juhalindfors
Date: 02/04/08 17:07:10
Modified: src/main/org/jboss/mx/server/registry
BasicMBeanRegistry.java
Log:
if registry.get() is called with null ref, throw instancenotfound immediately
Revision Changes Path
1.13 +7 -1
jmx/src/main/org/jboss/mx/server/registry/BasicMBeanRegistry.java
Index: BasicMBeanRegistry.java
===================================================================
RCS file:
/cvsroot/jboss/jmx/src/main/org/jboss/mx/server/registry/BasicMBeanRegistry.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- BasicMBeanRegistry.java 20 Mar 2002 18:26:32 -0000 1.12
+++ BasicMBeanRegistry.java 9 Apr 2002 00:07:09 -0000 1.13
@@ -49,13 +49,14 @@
* info@todo check garbage collection MBeanServer <--> Registry
* info@todo make register/unregister into interceptors for custom
* processing add different stages of the process
+ * info@todo check race conditions for MT (un)registerMBean (uses long types)
*
* @see org.jboss.mx.server.registry.MBeanRegistry
*
* @author <a href="mailto:[EMAIL PROTECTED]">Juha Lindfors</a>.
* @author <a href="mailto:[EMAIL PROTECTED]">Trevor Squires</a>.
* @author <a href="mailto:[EMAIL PROTECTED]">Adrian Brock</a>.
- * @version $Revision: 1.12 $
+ * @version $Revision: 1.13 $
*/
public class BasicMBeanRegistry
implements MBeanRegistry, BasicMBeanRegistryMBean
@@ -400,10 +401,15 @@
public synchronized MBeanEntry get(ObjectName name)
throws InstanceNotFoundException
{
+ if (name == null)
+ throw new InstanceNotFoundException("null object name");
+
// Determine the domain and retrieve its entries
String domain = name.getDomain();
+
if (domain.length() == 0)
domain = defaultDomain;
+
String props = name.getCanonicalKeyPropertyListString();
Map mbeanMap = (Map) domainMap.get(domain);
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development
Sponsored by http://www.ThinkGeek.com/