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 4a144bd04311ef859178da2b5477f216cf95c14f Author: Otavio Rodolfo Piske <[email protected]> AuthorDate: Mon Jan 26 11:47:53 2026 +0000 (chores): modernize instanceof checks in camel-printer --- .../main/java/org/apache/camel/component/printer/PrinterProducer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java index a91c5ee0094e..1adc6fd4807b 100644 --- a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java +++ b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java @@ -100,8 +100,7 @@ public class PrinterProducer extends DefaultProducer { return null; } else { for (Media media : medias) { - if (media instanceof MediaTray) { - MediaTray mediaTray = (MediaTray) media; + if (media instanceof MediaTray mediaTray) { String trayName = mediaTray.toString().trim(); if (trayName.contains(" ")) { trayName = trayName.replace(' ', '_');
