kwin commented on code in PR #8:
URL:
https://github.com/apache/sling-org-apache-sling-serviceusermapper/pull/8#discussion_r1236737027
##########
src/main/java/org/apache/sling/serviceusermapping/impl/ServiceUserMapperImpl.java:
##########
@@ -559,6 +560,10 @@ private List<ServicePrincipalsValidator>
getPrincipalsValidators() {
return getValidatorsIfPresent(principalsValidators);
}
+ private List<String> filterEmptyStringValues(String[] arr) {
Review Comment:
I would add the null check on the array in here instead of outside this
method.
##########
src/main/java/org/apache/sling/serviceusermapping/impl/ServiceUserMapperImpl.java:
##########
@@ -559,6 +560,10 @@ private List<ServicePrincipalsValidator>
getPrincipalsValidators() {
return getValidatorsIfPresent(principalsValidators);
}
+ private List<String> filterEmptyStringValues(String[] arr) {
+ return Arrays.stream(arr).filter(p ->
!p.trim().isEmpty()).collect(Collectors.toList());
Review Comment:
I would at least log that empty values are disregarded.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]