Search in sources :

Example 1 with CompositeDataInvocationHandler

use of javax.management.openmbean.CompositeDataInvocationHandler in project jdk8u_jdk by JetBrains.

the class MXBeanTest method proxyEqual.

// Also needed for 5095277
private static boolean proxyEqual(Object proxy1, Object proxy2, NamedMXBeans namedMXBeans) {
    if (proxy1.getClass() != proxy2.getClass())
        return proxy1.equals(proxy2);
    InvocationHandler ih1 = Proxy.getInvocationHandler(proxy1);
    InvocationHandler ih2 = Proxy.getInvocationHandler(proxy2);
    if (!(ih1 instanceof CompositeDataInvocationHandler) || !(ih2 instanceof CompositeDataInvocationHandler))
        return proxy1.equals(proxy2);
    CompositeData cd1 = ((CompositeDataInvocationHandler) ih1).getCompositeData();
    CompositeData cd2 = ((CompositeDataInvocationHandler) ih2).getCompositeData();
    return compositeDataEqual(cd1, cd2, namedMXBeans);
}
Also used : CompositeData(javax.management.openmbean.CompositeData) CompositeDataInvocationHandler(javax.management.openmbean.CompositeDataInvocationHandler) CompositeDataInvocationHandler(javax.management.openmbean.CompositeDataInvocationHandler) MBeanServerInvocationHandler(javax.management.MBeanServerInvocationHandler) InvocationHandler(java.lang.reflect.InvocationHandler)

Aggregations

InvocationHandler (java.lang.reflect.InvocationHandler)1 MBeanServerInvocationHandler (javax.management.MBeanServerInvocationHandler)1 CompositeData (javax.management.openmbean.CompositeData)1 CompositeDataInvocationHandler (javax.management.openmbean.CompositeDataInvocationHandler)1