This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch CAMEL-25928-http-list-body-test in repository https://gitbox.apache.org/repos/asf/camel.git
commit ab34305ecf7c5b0df91d943abbb8ca9c135ef14e Author: Claus Ibsen <[email protected]> AuthorDate: Tue Oct 27 07:08:21 2026 +0100 CAMEL-25928: the List of List.of is named "a List" in the body hints of camel-http, camel-file and platform-http-vertx tests Since the hints name a JDK internal class of the body by its interface, a body of List.of is "a List", not "a List (ImmutableCollections.List12)". Three tests still looked for "a List (". Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Claus Ibsen <[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();
