in src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java [646:665]
private boolean sameRestrictions(JackrabbitAccessControlEntry jace) throws RepositoryException {
// total (multivalue and simple) number of restrictions should be same
if(jace.getRestrictionNames().length == (restrictions.size())){
for(String rn : jace.getRestrictionNames()){
Value[] oldValues = jace.getRestrictions(rn);
Value[] newValues = restrictions.getRestrictions().get(rn) != null
? new Value[]{restrictions.getRestrictions().get(rn)}
: restrictions.getMVRestrictions().get(rn);
if((newValues == null || newValues.length == 0) && (oldValues == null || oldValues.length == 0)){
continue;
}
if(!compareValues(newValues, oldValues)) {
return false;
}
}
return true;
}
return false;
}