jdk/src/share/classes/com/sun/jmx/interceptor/DomainDispatchInterceptor.java
changeset 1709 392dd6db361a
parent 1222 78e3d021d528
--- a/jdk/src/share/classes/com/sun/jmx/interceptor/DomainDispatchInterceptor.java	Tue Dec 09 19:44:22 2008 +0100
+++ b/jdk/src/share/classes/com/sun/jmx/interceptor/DomainDispatchInterceptor.java	Tue Dec 09 20:20:48 2008 +0100
@@ -38,7 +38,6 @@
 
 import javax.management.MBeanServer;
 import javax.management.MBeanServerDelegate;
-import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 import javax.management.QueryExp;
 import javax.management.namespace.JMXDomain;
@@ -248,21 +247,17 @@
         if (pattern == null) return true;
         if (pattern.isDomainPattern()) return true;
 
-        try {
-            // case b) above.
-            //
-            // This is a bit of a hack. If there's any chance that a JMXDomain
-            // MBean name is selected by the given pattern then we must include
-            // the local namespace in our search.
-            //
-            // Returning true will have this effect. see 2. above.
-            //
-            if (pattern.apply(ALL_DOMAINS.withDomain(pattern.getDomain())))
-                return true;
-        } catch (MalformedObjectNameException x) {
-            // should not happen
-            throw new IllegalArgumentException(String.valueOf(pattern), x);
-        }
+        // case b) above.
+        //
+        // This is a bit of a hack. If there's any chance that a JMXDomain
+        // MBean name is selected by the given pattern then we must include
+        // the local namespace in our search.
+        //
+        // Returning true will have this effect. see 2. above.
+        //
+        if (pattern.apply(ALL_DOMAINS.withDomain(pattern.getDomain())))
+            return true;
+
         return false;
     }
 
@@ -291,8 +286,7 @@
     }
 
     @Override
-    final ObjectName getHandlerNameFor(String key)
-        throws MalformedObjectNameException {
+    final ObjectName getHandlerNameFor(String key) {
         return JMXDomain.getDomainObjectName(key);
     }