This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 5b9b2b0783 NIFI-15517 Updated Email Processors with explicit Executor
to resolve constructor deprecation (#10821)
5b9b2b0783 is described below
commit 5b9b2b0783f4381733e919ba9e2ebbdf0d6a0028
Author: dan-s1 <[email protected]>
AuthorDate: Thu Jan 29 15:20:45 2026 -0500
NIFI-15517 Updated Email Processors with explicit Executor to resolve
constructor deprecation (#10821)
Signed-off-by: David Handermann <[email protected]>
---
.../org/apache/nifi/processors/email/AbstractEmailProcessor.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/nifi-extension-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/AbstractEmailProcessor.java
b/nifi-extension-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/AbstractEmailProcessor.java
index 77854ed43a..d7c0c5d84e 100644
---
a/nifi-extension-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/AbstractEmailProcessor.java
+++
b/nifi-extension-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/AbstractEmailProcessor.java
@@ -54,6 +54,8 @@ import java.util.Properties;
import java.util.Set;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
/**
@@ -327,9 +329,10 @@ abstract class AbstractEmailProcessor<T extends
AbstractMailReceiver> extends Ab
// Spring Integration 7 expects an evaluation context bean;
register a lightweight one for the receiver
final StaticListableBeanFactory beanFactory = new
StaticListableBeanFactory();
final StandardEvaluationContext evaluationContext = new
StandardEvaluationContext();
+ final ScheduledExecutorService scheduledExecutor =
Executors.newSingleThreadScheduledExecutor();
evaluationContext.setBeanResolver(new
BeanFactoryResolver(beanFactory));
beanFactory.addBean(IntegrationContextUtils.INTEGRATION_EVALUATION_CONTEXT_BEAN_NAME,
evaluationContext);
-
beanFactory.addBean(IntegrationContextUtils.TASK_SCHEDULER_BEAN_NAME, new
ConcurrentTaskScheduler());
+
beanFactory.addBean(IntegrationContextUtils.TASK_SCHEDULER_BEAN_NAME, new
ConcurrentTaskScheduler(scheduledExecutor));
this.messageReceiver.setBeanFactory(beanFactory);
this.messageReceiver.afterPropertiesSet();