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-jcr-repoinit.git
The following commit(s) were added to refs/heads/master by this push:
new 5b7314e Revert "SLING-8605 - AclUtil.createLocalRestrictions should
use JackrabbitAccessControlList.isMultiValueRestriction(String)"
5b7314e is described below
commit 5b7314e4eb198818af6d61fc0601eeae44daf1d5
Author: Robert Munteanu <[email protected]>
AuthorDate: Wed Sep 18 17:39:43 2019 +0200
Revert "SLING-8605 - AclUtil.createLocalRestrictions should use
JackrabbitAccessControlList.isMultiValueRestriction(String)"
This reverts commit da2a93d00a6083e9549bf3afc60ffd39e2b65d6e.
---
src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java
b/src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java
index fdf3dbf..1adb0e7 100644
--- a/src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java
+++ b/src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java
@@ -73,7 +73,6 @@ public class AclUtil {
for(RestrictionClause rc : list){
String restrictionName = rc.getName();
int type = jacl.getRestrictionType(restrictionName);
- boolean isMvRestriction =
jacl.isMultiValueRestriction(restrictionName);
Value[] values = new Value[rc.getValues().size()];
for(int i=0;i<values.length;i++) {
values[i] = vf.createValue(rc.getValues().get(i),type);
@@ -83,15 +82,15 @@ public class AclUtil {
// SLING-7280 - special case for rep:glob which supports an
empty string
// to mean "no values"
restrictions.put(restrictionName, vf.createValue(""));
- } else if (isMvRestriction) {
- mvrestrictions.put(restrictionName, values);
- } else {
- checkState(values.length == 1, "Expected just one value for
single valued restriction with name " + restrictionName);
+ } else if(values.length == 1) {
restrictions.put(restrictionName, values[0]);
+ } else {
+ mvrestrictions.put(restrictionName, values);
}
}
}
return new LocalRestrictions(restrictions,mvrestrictions);
+
}