This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new ac95735f0fc9 CAMEL-25928: tests - the List of List.of is named "a 
List" in the body hints (#28541)
ac95735f0fc9 is described below

commit ac95735f0fc946257b717a96cbb71a1aa9a8ccda
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Oct 27 07:36:07 2026 +0100

    CAMEL-25928: tests - the List of List.of is named "a List" in the body 
hints (#28541)
    
    #28500 (abca5fbead82) made BodyFacts call a JDK internal class of the body
    by its interface, so a body of List.of(...) is now "a List", not
    "a List (ImmutableCollections.List12)". Three tests in camel-http, 
camel-file
    and camel-platform-http-vertx still asserted "the body is a List (" and now
    assert the whole sentence, like the Map assertions next to them.
    
    Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
---
 .../org/apache/camel/component/file/FileProducerMapBodyTest.java   | 6 +++---
 .../org/apache/camel/component/http/HttpProducerMapBodyTest.java   | 3 ++-
 .../platform/http/vertx/VertxPlatformHttpMapResponseTest.java      | 7 ++++---
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git 
a/components/camel-file/src/test/java/org/apache/camel/component/file/FileProducerMapBodyTest.java
 
b/components/camel-file/src/test/java/org/apache/camel/component/file/FileProducerMapBodyTest.java
index 4076e78a75e9..1e25aa519b2e 100644
--- 
a/components/camel-file/src/test/java/org/apache/camel/component/file/FileProducerMapBodyTest.java
+++ 
b/components/camel-file/src/test/java/org/apache/camel/component/file/FileProducerMapBodyTest.java
@@ -61,9 +61,9 @@ public class FileProducerMapBodyTest {
     public void testListBodyToACsvFileWithCharset() throws Exception {
         // the file name says the data format; a charset writes through a 
reader, made from the same stream
         String message = failure(List.of(List.of("A1", "2")), "UTF-8", 
"lines.csv");
-        assertTrue(message.contains("the body is a List ("), message);
-        assertTrue(message.contains("which is not file content: marshal it 
first (marshal: csv, for the file name"
-                                    + " lines.csv)"),
+        // the List of List.of is a JDK internal class: the message names it 
by its interface (CAMEL-25928)
+        assertTrue(message.contains("the body is a List, which is not file 
content: marshal it first (marshal: csv, for"
+                                    + " the file name lines.csv)"),
                 message);
     }
 
diff --git 
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerMapBodyTest.java
 
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerMapBodyTest.java
index 1e45694f9bae..2219bc351bec 100644
--- 
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerMapBodyTest.java
+++ 
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerMapBodyTest.java
@@ -101,6 +101,7 @@ public class HttpProducerMapBodyTest extends BaseHttpTest {
                 e -> e.getIn().setBody(List.of(Map.of("sku", "CAMEL-MUG"))));
 
         
assertThat(exchange.getException()).isInstanceOf(InvalidPayloadException.class)
-                .hasMessageContaining("the body is a List 
(").hasMessageContaining("which is not an HTTP request body");
+                // the List of List.of is a JDK internal class: the message 
names it by its interface (CAMEL-25928)
+                .hasMessageContaining("the body is a List, which is not an 
HTTP request body");
     }
 }
diff --git 
a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpMapResponseTest.java
 
b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpMapResponseTest.java
index 09b4ad4fa602..2a07044de7c8 100644
--- 
a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpMapResponseTest.java
+++ 
b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpMapResponseTest.java
@@ -84,9 +84,10 @@ public class VertxPlatformHttpMapResponseTest {
                     map);
             // the Content-Type names the data format; the REST binding does 
not write csv
             String csv = handler.handled.get(1).getMessage();
-            assertTrue(csv.contains("the body is a List ("), csv);
-            assertTrue(csv.contains("which is not an HTTP response body: 
marshal it first (marshal: csv, for the"
-                                    + " Content-Type text/csv), or set the 
body to the text, as the last step of the route"),
+            // the List of List.of is a JDK internal class: the message names 
it by its interface (CAMEL-25928)
+            assertTrue(csv.contains("the body is a List, which is not an HTTP 
response body: marshal it first (marshal: csv,"
+                                    + " for the Content-Type text/csv), or set 
the body to the text, as the last step of the"
+                                    + " route"),
                     csv);
             assertFalse(csv.contains("REST binding"), csv);
             String xml = handler.handled.get(2).getMessage();

Reply via email to