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);
}
Aggregations