This is an automated email from the ASF dual-hosted git repository. ilgrosso pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/2_1_X by this push: new 5214d502ce [SYNCOPE-1709] Ensure to clean up JobStatus after non-standard Push / Pull JobDelegate classes 5214d502ce is described below commit 5214d502ce4fa6ee02e23b3f5aa2193c675c0f00 Author: Francesco Chicchiriccò <ilgro...@apache.org> AuthorDate: Tue Nov 29 16:43:49 2022 +0100 [SYNCOPE-1709] Ensure to clean up JobStatus after non-standard Push / Pull JobDelegate classes --- .../core/provisioning/java/pushpull/SinglePullJobDelegate.java | 3 +++ .../core/provisioning/java/pushpull/SinglePushJobDelegate.java | 4 ++++ .../core/provisioning/java/pushpull/stream/StreamPullJobDelegate.java | 2 ++ .../core/provisioning/java/pushpull/stream/StreamPushJobDelegate.java | 2 ++ 4 files changed, 11 insertions(+) diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SinglePullJobDelegate.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SinglePullJobDelegate.java index f6b3f2e38f..58f3249cbd 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SinglePullJobDelegate.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SinglePullJobDelegate.java @@ -86,6 +86,7 @@ public class SinglePullJobDelegate extends PullJobDelegate implements SyncopeSin pullTask.setSyncStatus(pullTaskTO.isSyncStatus()); pullTask.setDestinationRealm(realmDAO.findByFullPath(pullTaskTO.getDestinationRealm())); pullTask.setRemediation(pullTaskTO.isRemediation()); + // validate JEXL expressions from templates and proceed if fine templateUtils.check(pullTaskTO.getTemplates(), ClientExceptionType.InvalidPullTask); pullTaskTO.getTemplates().forEach((type, template) -> { @@ -163,6 +164,8 @@ public class SinglePullJobDelegate extends PullJobDelegate implements SyncopeSin throw e instanceof JobExecutionException ? (JobExecutionException) e : new JobExecutionException("While pulling from connector", e); + } finally { + setStatus(null); } } } diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SinglePushJobDelegate.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SinglePushJobDelegate.java index 143c1616d1..4eda018eb5 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SinglePushJobDelegate.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SinglePushJobDelegate.java @@ -113,6 +113,8 @@ public class SinglePushJobDelegate extends PushJobDelegate implements SyncopeSin throw e instanceof JobExecutionException ? (JobExecutionException) e : new JobExecutionException("While pushing to connector", e); + } finally { + setStatus(null); } } @@ -140,6 +142,8 @@ public class SinglePushJobDelegate extends PushJobDelegate implements SyncopeSin throw e instanceof JobExecutionException ? (JobExecutionException) e : new JobExecutionException("While pushing to connector", e); + } finally { + setStatus(null); } } } diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPullJobDelegate.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPullJobDelegate.java index 184668b412..84304c2faa 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPullJobDelegate.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPullJobDelegate.java @@ -244,6 +244,8 @@ public class StreamPullJobDelegate extends PullJobDelegate implements SyncopeStr throw e instanceof JobExecutionException ? (JobExecutionException) e : new JobExecutionException("While stream pulling", e); + } finally { + setStatus(null); } } } diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPushJobDelegate.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPushJobDelegate.java index 289d5da83e..e2c23ace48 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPushJobDelegate.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPushJobDelegate.java @@ -181,6 +181,8 @@ public class StreamPushJobDelegate extends PushJobDelegate implements SyncopeStr throw e instanceof JobExecutionException ? (JobExecutionException) e : new JobExecutionException("While stream pushing", e); + } finally { + setStatus(null); } } }