mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -271,6 +271,25 @@ import org.alfresco.service.cmr.repository.StoreRef;
|
|||||||
throw e.getTargetException();
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user