You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2019/10/24 09:38:09 UTC
[sling-org-apache-sling-repoinit-parser] branch master updated:
SLING-8798 - AclLine.getRestrictions should not return null
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-repoinit-parser.git
The following commit(s) were added to refs/heads/master by this push:
new 914de06 SLING-8798 - AclLine.getRestrictions should not return null
914de06 is described below
commit 914de063e5b187ee9dfb76c3adea303c78460e5e
Author: Angela Schreiber <an...@apache.org>
AuthorDate: Thu Oct 24 11:37:33 2019 +0200
SLING-8798 - AclLine.getRestrictions should not return null
---
.../java/org/apache/sling/repoinit/parser/operations/AclLine.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/sling/repoinit/parser/operations/AclLine.java b/src/main/java/org/apache/sling/repoinit/parser/operations/AclLine.java
index 4e5222b..6c78f1f 100644
--- a/src/main/java/org/apache/sling/repoinit/parser/operations/AclLine.java
+++ b/src/main/java/org/apache/sling/repoinit/parser/operations/AclLine.java
@@ -17,7 +17,6 @@
package org.apache.sling.repoinit.parser.operations;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -27,7 +26,6 @@ import java.util.TreeMap;
public class AclLine {
private final Action action;
- private static final List<String> EMPTY_LIST = Collections.unmodifiableList(new ArrayList<String>());
public static final String PROP_PATHS = "paths";
public static final String PROP_PRINCIPALS = "principals";
@@ -58,7 +56,7 @@ public class AclLine {
*/
public List<String> getProperty(String name) {
List<String> value = properties.get(name);
- return value != null ? value : EMPTY_LIST;
+ return value != null ? value : Collections.<String>emptyList();
}
public void setProperty(String name, List<String> values) {
@@ -70,7 +68,7 @@ public class AclLine {
}
public List<RestrictionClause> getRestrictions() {
- return this.restrictions;
+ return (restrictions == null) ? Collections.<RestrictionClause>emptyList() : restrictions;
}
@Override