ilgrosso commented on code in PR #1176:
URL: https://github.com/apache/syncope/pull/1176#discussion_r2344080947
##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/DefaultPropagationManager.java:
##########
@@ -236,11 +238,16 @@ public List<PropagationTaskInfo> getUserUpdateTasks(
public List<PropagationTaskInfo> getUserUpdateTasks(final
UserWorkflowResult<Pair<UserUR, Boolean>> wfResult) {
UserUR userUR = wfResult.getResult().getLeft();
+ List<String> linkedAccountsResources =
userUR.getLinkedAccounts().stream()
+ .map(LinkedAccountUR::getLinkedAccountTO)
+ .filter(linkedAccountTO -> linkedAccountTO.getPassword() != null)
+ .map(LinkedAccountTO::getResource).collect(Collectors.toList());
Review Comment:
need to add `.distinct()` to the stream to avoid to repeat the same Resource
several times
##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/DefaultPropagationManager.java:
##########
@@ -236,11 +238,16 @@ public List<PropagationTaskInfo> getUserUpdateTasks(
public List<PropagationTaskInfo> getUserUpdateTasks(final
UserWorkflowResult<Pair<UserUR, Boolean>> wfResult) {
UserUR userUR = wfResult.getResult().getLeft();
+ List<String> linkedAccountsResources =
userUR.getLinkedAccounts().stream()
+ .map(LinkedAccountUR::getLinkedAccountTO)
+ .filter(linkedAccountTO -> linkedAccountTO.getPassword() != null)
Review Comment:
this should be
```java
linkedAccountTO -> linkedAccountTO != null
&& linkedAccountTO.getPassword() != null
```
--
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]