ilgrosso commented on a change in pull request #304:
URL: https://github.com/apache/syncope/pull/304#discussion_r795512243



##########
File path: core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
##########
@@ -454,8 +455,12 @@ public void actionJob(final String key, final JobAction 
action) {
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.TASK_DELETE + "')")
-    public List<PropagationTaskTO> purgePropagations(final Date since, final 
List<ExecStatus> statuses) {
-        return taskDAO.purgePropagations(since, statuses);
+    public List<PropagationTaskTO> purgePropagations(
+            final Date since,
+            final List<ExecStatus> statuses,
+            final List<String> resources) {
+        return taskDAO.purgePropagations(since, statuses, resources.stream()
+                .map(r -> resourceDAO.find(r)).collect(Collectors.toList()));

Review comment:
       this should be better written as
   
   ```
   
resources.stream().map(resourceDAO::find).filter(Objects::nonNull).collect(Collectors.toList()
   ```




-- 
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: dev-unsubscr...@syncope.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to