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 e99558bbdc20970d4c4a46b6a77e02fc50e02f85 Author: Otavio Rodolfo Piske <[email protected]> AuthorDate: Mon Jan 26 11:17:43 2026 +0000 (chores): modernize instanceof checks in camel-file --- .../main/java/org/apache/camel/component/file/GenericFileProducer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileProducer.java b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileProducer.java index 22f3eff0c42c..6b530fe654c0 100644 --- a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileProducer.java +++ b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileProducer.java @@ -374,7 +374,7 @@ public class GenericFileProducer<T> extends DefaultAsyncProducer { exchange.getIn().setHeader(FileConstants.FILE_NAME, value); } - if (value instanceof String && StringHelper.hasStartToken((String) value, "simple")) { + if (value instanceof String str && StringHelper.hasStartToken(str, "simple")) { LOG.warn( "Simple expression: {} detected in header: {} of type String. This feature has been removed (see CAMEL-6748).", value, FileConstants.FILE_NAME);
