ilgrosso commented on code in PR #1198:
URL: https://github.com/apache/syncope/pull/1198#discussion_r2390260504


##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPushResultHandler.java:
##########
@@ -201,11 +207,24 @@ protected void assign(final Any<?> any, final Boolean 
enabled, final Provisionin
                 operation(PatchOperation.ADD_REPLACE).
                 value(profile.getTask().getResource().getKey()).build());
 
+        copyDynMembershipConds(any, req);
+
         update(req);
 
         provision(any, enabled, result);
     }
 
+    protected void copyDynMembershipConds(final Any<?> any, final AnyUR req) {
+        if (any instanceof Group

Review Comment:
   I think you will need a structured `if`:
   
   ```java
    if (any instanceof Group) {
      Optional.ofNullable((Group) any).getUDynMembership()).
   ifPresent(udc ->  ((GroupUR) req).setUDynMembershipCond(udc.getFIQLCond()));
   
     ((Group) any).getADynMemberships().forEach(aDynGroupMembership ->
                       ((GroupUR) req).getADynMembershipConds().put(
                               aDynGroupMembership.getAnyType().getKey(), 
aDynGroupMembership.getFIQLCond()));
    }
   ```



-- 
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]

Reply via email to