[
https://issues.apache.org/jira/browse/OAK-739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lukas Eder updated OAK-739:
---------------------------
Description:
I was digging in the Oak code and I've stumbled upon an assymetric equals()
implementation between the following two nested classes:
- AccessControlManagerImpl.PrincipalACL
- AccessControlManagerImpl.NodeACL
Assume the following:
{code}
PrincipalACL p = ...
NodeACL n = ...
assertTrue(n.equals(p));
assertFalse(p.equals(n));
{code}
Since PrincipalACL.equals() looks almost the same as NodeACL.equals() except
for the instanceof check, I suggest removing the override, or delegating to
super.equals() instead of returning false.
was:
I was digging in the Oak code and I've stumbled upon an assymetric equals()
implementation between the following two nested classes:
- AccessControlManagerImpl.PrincipalACL
- AccessControlManagerImpl.NodeACL
Assume the following:
PrincipalACL p = ...
NodeACL n = ...
assertTrue(n.equals(p));
assertFalse(p.equals(n));
Since PrincipalACL.equals() looks almost the same as NodeACL.equals() except
for the instanceof check, I suggest removing the override, or delegating to
super.equals() instead of returning false.
> Asymmetric equals() implementation in AccessControlManagerImpl's nested
> classes PrincipalACL / NodeACL
> ------------------------------------------------------------------------------------------------------
>
> Key: OAK-739
> URL: https://issues.apache.org/jira/browse/OAK-739
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Affects Versions: 0.7
> Reporter: Lukas Eder
> Priority: Minor
>
> I was digging in the Oak code and I've stumbled upon an assymetric equals()
> implementation between the following two nested classes:
> - AccessControlManagerImpl.PrincipalACL
> - AccessControlManagerImpl.NodeACL
> Assume the following:
> {code}
> PrincipalACL p = ...
> NodeACL n = ...
> assertTrue(n.equals(p));
> assertFalse(p.equals(n));
> {code}
> Since PrincipalACL.equals() looks almost the same as NodeACL.equals() except
> for the instanceof check, I suggest removing the override, or delegating to
> super.equals() instead of returning false.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira