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 "Lukas Eder (JIRA)" <ji...@apache.org> on 2013/04/03 14:37:15 UTC

[jira] [Created] (OAK-739) Asymmetric equals() implementation in AccessControlManagerImpl's nested classes PrincipalACL / NodeACL

Lukas Eder created OAK-739:
------------------------------

             Summary: 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:

  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.

--
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