Lars Grefer created OAK-8949:
--------------------------------

             Summary: Senseless code in PrincipalRestrictionProvider
                 Key: OAK-8949
                 URL: https://issues.apache.org/jira/browse/OAK-8949
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: security
    Affects Versions: 1.20.0
            Reporter: Lars Grefer


{{org.apache.jackrabbit.oak.security.authorization.restriction.PrincipalRestrictionProvider#writeRestrictions}}
 sems too contain useless code right here:

[https://github.com/apache/jackrabbit-oak/blob/e1ababdc2db085a3e73413382262e8adcec716f3/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/PrincipalRestrictionProvider.java#L100]

The {{restrictions}} set is copied to a new HashSet and then some elements are 
removed from the new set. After that, the new set seems to be never used again.

The change was introduced by OAK-7944. Before that, the elements were removed 
from the {{restrictions}} set itself and not from the copy.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to