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 Schreiber (Jira)" <ji...@apache.org> on 2019/10/31 17:40:00 UTC

[jira] [Created] (OAK-8733) Simplify ExternalGroupPrincipalProvider

Angela Schreiber created OAK-8733:
-------------------------------------

             Summary: Simplify ExternalGroupPrincipalProvider
                 Key: OAK-8733
                 URL: https://issues.apache.org/jira/browse/OAK-8733
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: auth-external
            Reporter: Angela Schreiber
            Assignee: Angela Schreiber
             Fix For: 1.20.0


the following 2 methods can be simplified in {{ExternalGroupPrincipalProvider}}

- _getGroupPrincipals_: {{userTree.hasProperty(REP_EXTERNAL_PRINCIPAL_NAMES)}} can be omitted from the if clause, as the return value of {{getProperty}} is anyway checked for _null_. 
- _ExternalGroupPrincipalProvider.GroupPrincipalIterator.getNext()_: the {{PropertyValue}} as obtained from the {{ResultRow}} will never contain _null_ elements and the extra check for _null_ can be omitted. if extra defensiveness is desired the values could be filtered for null elements.



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