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

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 3f77303a47fc9cba37dcf1e389d3c7ce896cb766
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Mon Jan 26 11:25:04 2026 +0000

    (chores): modernize instanceof checks in camel-cron
---
 .../src/main/java/org/apache/camel/component/cron/CronComponent.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/components/camel-cron/src/main/java/org/apache/camel/component/cron/CronComponent.java
 
b/components/camel-cron/src/main/java/org/apache/camel/component/cron/CronComponent.java
index 8d66b9752efd..1bad1cfd5de0 100644
--- 
a/components/camel-cron/src/main/java/org/apache/camel/component/cron/CronComponent.java
+++ 
b/components/camel-cron/src/main/java/org/apache/camel/component/cron/CronComponent.java
@@ -64,8 +64,7 @@ public class CronComponent extends DefaultComponent {
         // create delegate and set on endpoint
         Endpoint delegate = this.service.createEndpoint(configuration);
         answer.setDelegate(delegate);
-        if (delegate instanceof DefaultEndpoint) {
-            DefaultEndpoint de = (DefaultEndpoint) delegate;
+        if (delegate instanceof DefaultEndpoint de) {
             de.setAutowiredEnabled(answer.isAutowiredEnabled());
             de.setBridgeErrorHandler(answer.isBridgeErrorHandler());
             de.setExceptionHandler(answer.getExceptionHandler());

Reply via email to