Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

76027: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (5.0/Cloud)
      75707: Merged DEV to V4.2-BUG-FIX (4.2.3)
         71368 : MNT-11318 : Rule script gets executed six times when a document is moved
             - implement equals and hashCode methods for policy proxies with SingleHandler


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@77548 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2014-07-22 13:51:08 +00:00
parent ebf8652ebb
commit 2c2d283868

View File

@@ -271,6 +271,25 @@ import org.alfresco.service.cmr.repository.StoreRef;
throw e.getTargetException();
}
}
public boolean equals(Object obj)
{
if (obj != null && Proxy.isProxyClass(obj.getClass()))
{
InvocationHandler handler = Proxy.getInvocationHandler(obj);
if (handler instanceof SingleHandler)
{
return ((SingleHandler)handler).policyInterface.equals(policyInterface);
}
}
return obj.equals(policyInterface);
}
public int hashCode()
{
return policyInterface.hashCode();
}
}