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 d9d2cb2500f93b1fd2358d668afb884f477781ef Author: Otavio Rodolfo Piske <[email protected]> AuthorDate: Mon Jan 26 11:27:26 2026 +0000 (chores): modernize instanceof checks in camel-exec --- .../apache/camel/component/exec/impl/DefaultExecCommandExecutor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java b/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java index de029d98a8fb..1f94a79ca816 100644 --- a/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java +++ b/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java @@ -88,9 +88,9 @@ public class DefaultExecCommandExecutor implements ExecCommandExecutor { InputStream stderr = err.size() == 0 ? null : new ByteArrayInputStream(err.toByteArray()); int exitValue = 0; // use 0 as exit value as the executor didn't return the value - if (executor instanceof ExecDefaultExecutor) { + if (executor instanceof ExecDefaultExecutor execDefaultExecutor) { // get the exit value from the executor as it captures this to work around the common-exec bug - exitValue = ((ExecDefaultExecutor) executor).getExitValue(); + exitValue = execDefaultExecutor.getExitValue(); } // workaround to Disabled if the stream was already closes due some race condition in commons-exec
