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 bbec894b9059f80616803a5bf43db9bd5cc4f1a3
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Tue Jan 27 05:55:57 2026 +0000

    (chores): modernize instanceof checks in camel-google-vertexai
---
 .../apache/camel/component/google/vertexai/GoogleVertexAIProducer.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/components/camel-google/camel-google-vertexai/src/main/java/org/apache/camel/component/google/vertexai/GoogleVertexAIProducer.java
 
b/components/camel-google/camel-google-vertexai/src/main/java/org/apache/camel/component/google/vertexai/GoogleVertexAIProducer.java
index d5a2cb46b982..3bfb59ae94bc 100644
--- 
a/components/camel-google/camel-google-vertexai/src/main/java/org/apache/camel/component/google/vertexai/GoogleVertexAIProducer.java
+++ 
b/components/camel-google/camel-google-vertexai/src/main/java/org/apache/camel/component/google/vertexai/GoogleVertexAIProducer.java
@@ -235,8 +235,7 @@ public class GoogleVertexAIProducer extends DefaultProducer 
{
         String publisher = config.getPublisher();
 
         // If body is already a JSON string, use it as-is (but add 
anthropic_version if needed)
-        if (body instanceof String) {
-            String bodyStr = (String) body;
+        if (body instanceof String bodyStr) {
             if (bodyStr.trim().startsWith("{")) {
                 // It's JSON - add anthropic_version if Anthropic publisher 
and not already present
                 if ("anthropic".equals(publisher) && 
!bodyStr.contains("anthropic_version")) {

Reply via email to