ilgrosso commented on code in PR #1352:
URL: https://github.com/apache/syncope/pull/1352#discussion_r3108699795
##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/DefaultNotificationManager.java:
##########
@@ -355,6 +355,15 @@ public List<NotificationTask> createTasks(
}
}
});
+ if (any.isEmpty()) {
Review Comment:
Why not moving these statements above, e.g. change lines 346 and below from
```java
any.ifPresent(a -> {
...
```
to
```java
any.ifPresentOrElse(
a -> {
switch (a) {
case User user ->
jexlVars.put("user",
userDataBinder.getUserTO(user, true));
case Group group ->
jexlVars.put("group",
groupDataBinder.getGroupTO(group, true));
case AnyObject anyObject ->
jexlVars.put("anyObject",
anyObjectDataBinder.getAnyObjectTO(anyObject, true));
default -> {
}
}
},
() -> {
switch (before) {
case UserTO userTO ->
jexlVars.put("user", userTO);
case GroupTO groupTO ->
jexlVars.put("group", groupTO);
case AnyObjectTO anyObjectTO ->
jexlVars.put("anyObject",
anyObjectTO);
default -> {
}
}
});
```
--
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]