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:41:00 UTC

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

     [ https://issues.apache.org/jira/browse/OAK-8733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Angela Schreiber resolved OAK-8733.
-----------------------------------
    Resolution: Fixed

Committed revision 1869225.


> 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
>            Priority: Minor
>             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)