You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (Jira)" <ji...@apache.org> on 2019/10/24 09:39:00 UTC
[jira] [Resolved] (SLING-8798) AclLine.getRestrictions should not
return null
[ https://issues.apache.org/jira/browse/SLING-8798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Munteanu resolved SLING-8798.
------------------------------------
Fix Version/s: Repoinit Parser 1.3.2
Assignee: Robert Munteanu
Resolution: Fixed
Thanks for the patch, [~angela]. I've applied it in [sling-org-apache-sling-repoinit-parser commit 914de06|https://github.com/apache/sling-org-apache-sling-repoinit-parser/commit/914de06]
> AclLine.getRestrictions should not return null
> ----------------------------------------------
>
> Key: SLING-8798
> URL: https://issues.apache.org/jira/browse/SLING-8798
> Project: Sling
> Issue Type: Improvement
> Components: Repoinit
> Reporter: Angela Schreiber
> Assignee: Robert Munteanu
> Priority: Major
> Fix For: Repoinit Parser 1.3.2
>
> Attachments: SLING-8798.patch
>
>
> while trying to add nullable/notnull annotations in _sling-jcr-repoinit_ to improve overall readability and maintainability of the code base, i noticed that {{AclLine.getRestrictions}} may return null. I would recommend to change this to be consistent with {{AclLine.getProperty}}, which returns an empty list in case no values exist for a given property name.
> Proposed patch attached (including replacing a private static final EMPTY_LIST field by {{Collections.emptyList}}, which afaik is also defined to be immutable.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)