You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2017/02/24 17:15:44 UTC
[jira] [Comment Edited] (OAK-5784) hashCode of RestrictionImpl
doesn't include value
[ https://issues.apache.org/jira/browse/OAK-5784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15880695#comment-15880695 ]
angela edited comment on OAK-5784 at 2/24/17 5:15 PM:
------------------------------------------------------
trunk: Committed revision 1784162.
1.6.1: Committed revision 1784304.
was (Author: anchela):
Committed revision 1784162.
> hashCode of RestrictionImpl doesn't include value
> -------------------------------------------------
>
> Key: OAK-5784
> URL: https://issues.apache.org/jira/browse/OAK-5784
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: angela
> Assignee: angela
> Labels: performance
> Fix For: 1.7.0, 1.8
>
> Attachments: ace_creation_noRestrictionFix_withSave.txt, ace_creation_restrictionHashFix_withSave.txt, OAK-5784.patch
>
>
> The hashCode generation of {{RestrictionImpl}} currently looks as follows:
> {code}
> public int hashCode() {
> return Objects.hashCode(definition, property);
> }
> {code}
> However, the hashCode of our {{PropertyState}} implementation doesn't include the value. See {{AbstractPropertyState}}:
> {code}
> public static int hashCode(PropertyState property) {
> return property.getName().hashCode();
> }
> {code}
> Consequently the hashCode of the {{AccessControlEntry}} implementation, the validation of ACEs in {{AccessControlValidator}} and the {{AcEntry}} created in the {{PermissionHook}} generates the same hashCode for entries that only differ by the value of a restriction.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)