jdk/src/java.management/share/classes/javax/management/MBeanServerInvocationHandler.java
changeset 31701 b4d934543e0a
parent 31700 e803266598cb
equal deleted inserted replaced
31700:e803266598cb 31701:b4d934543e0a
   139                                         ObjectName objectName,
   139                                         ObjectName objectName,
   140                                         boolean isMXBean) {
   140                                         boolean isMXBean) {
   141         if (connection == null) {
   141         if (connection == null) {
   142             throw new IllegalArgumentException("Null connection");
   142             throw new IllegalArgumentException("Null connection");
   143         }
   143         }
   144 //        if (Proxy.isProxyClass(connection.getClass())) {
   144         if (Proxy.isProxyClass(connection.getClass())) {
   145 //            if (MBeanServerInvocationHandler.class.isAssignableFrom(
   145             if (MBeanServerInvocationHandler.class.isAssignableFrom(
   146 //                    Proxy.getInvocationHandler(connection).getClass())) {
   146                     Proxy.getInvocationHandler(connection).getClass())) {
   147 //                throw new IllegalArgumentException("Wrapping MBeanServerInvocationHandler");
   147                 throw new IllegalArgumentException("Wrapping MBeanServerInvocationHandler");
   148 //            }
   148             }
   149 //        }
   149         }
   150         if (objectName == null) {
   150         if (objectName == null) {
   151             throw new IllegalArgumentException("Null object name");
   151             throw new IllegalArgumentException("Null object name");
   152         }
   152         }
   153         this.connection = connection;
   153         this.connection = connection;
   154         this.objectName = objectName;
   154         this.objectName = objectName;
   422         if (methodName.equals("equals")
   422         if (methodName.equals("equals")
   423             && Arrays.equals(method.getParameterTypes(),
   423             && Arrays.equals(method.getParameterTypes(),
   424                              new Class<?>[] {Object.class})
   424                              new Class<?>[] {Object.class})
   425             && isLocal(proxy, method))
   425             && isLocal(proxy, method))
   426             return true;
   426             return true;
   427 //        if (methodName.equals("finalize")
   427         if (methodName.equals("finalize")
   428 //            && method.getParameterTypes().length == 0) {
   428             && method.getParameterTypes().length == 0) {
   429 //            return true;
   429             return true;
   430 //        }
   430         }
   431         return false;
   431         return false;
   432     }
   432     }
   433 
   433 
   434     private Object doLocally(Object proxy, Method method, Object[] args) {
   434     private Object doLocally(Object proxy, Method method, Object[] args) {
   435         final String methodName = method.getName();
   435         final String methodName = method.getName();