This is an automated email from the ASF dual-hosted git repository.

matato pushed a commit to branch 4_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/4_1_X by this push:
     new 34176e6fdf Improve type handling in 
DefaultNotificationManager.createTasks
34176e6fdf is described below

commit 34176e6fdf24b3b3c99aefe49da9290ec7c043e1
Author: TatoniMatteo <[email protected]>
AuthorDate: Tue Mar 17 10:47:07 2026 +0100

    Improve type handling in DefaultNotificationManager.createTasks
---
 .../provisioning/java/notification/DefaultNotificationManager.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/DefaultNotificationManager.java
 
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/DefaultNotificationManager.java
index 98599cb54b..067ea8ebce 100644
--- 
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/DefaultNotificationManager.java
+++ 
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/DefaultNotificationManager.java
@@ -292,7 +292,9 @@ public class DefaultNotificationManager implements 
NotificationManager {
 
         Optional<? extends Any> any = Optional.empty();
 
-        if (before instanceof UserTO userTO) {
+        if (before instanceof Any a) {
+            any = Optional.of(a);
+        } else if (before instanceof UserTO userTO) {
             any = userDAO.findById(userTO.getKey());
         } else if (output instanceof UserTO userTO) {
             any = userDAO.findById(userTO.getKey());

Reply via email to