You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2026/02/06 14:43:35 UTC
(camel) 04/23: (chores): modernize instanceof checks in camel-kamelet-main
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 04829e289a6263ab9d1ec818d9aae1e5323f612c
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Feb 6 13:10:25 2026 +0000
(chores): modernize instanceof checks in camel-kamelet-main
---
.../camel/main/download/DependencyDownloaderComponentResolver.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderComponentResolver.java b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderComponentResolver.java
index 5e51e5ba18b5..8c28fe18a07c 100644
--- a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderComponentResolver.java
+++ b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderComponentResolver.java
@@ -74,8 +74,7 @@ public final class DependencyDownloaderComponentResolver extends DefaultComponen
} else {
answer = super.resolveComponent("stub", context);
}
- if ((silent || transform || stubPattern != null) && answer instanceof StubComponent) {
- StubComponent sc = (StubComponent) answer;
+ if ((silent || transform || stubPattern != null) && answer instanceof StubComponent sc) {
// enable shadow mode on stub component
sc.setShadow(true);
sc.setShadowPattern(stubPattern);