You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/03/26 12:54:09 UTC

[camel] branch main updated: CAMEL-18619: Stream closed for onException with useOriginalMessage

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 ae81a021838 CAMEL-18619: Stream closed for onException with useOriginalMessage
ae81a021838 is described below

commit ae81a021838523435686974a3b88c3c32ddd61c5
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Mar 26 14:47:12 2023 +0200

    CAMEL-18619: Stream closed for onException with useOriginalMessage
---
 .../onexception/OnExceptionUseOriginalMessageStreamTest.java | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionUseOriginalMessageStreamTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionUseOriginalMessageStreamTest.java
index 60c0ca60164..8126ac9338c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionUseOriginalMessageStreamTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionUseOriginalMessageStreamTest.java
@@ -52,9 +52,7 @@ public class OnExceptionUseOriginalMessageStreamTest extends ContextTestSupport
     @Test
     void unmarshallWithStreamCache() {
         // Cached stream is closed unmarshalling
-        String data = """
-                {"test": "data"}
-                """;
+        String data = "{\"test\": \"data\"";
         InputStream is = new ByteArrayInputStream(data.getBytes());
         Object out = template.requestBody("direct:unmarshallWithStreamCache", is, Object.class);
         Assertions.assertEquals(data, out);
@@ -63,9 +61,7 @@ public class OnExceptionUseOriginalMessageStreamTest extends ContextTestSupport
     @Test
     void unmarshallWithoutStreamCache() {
         // Uncached stream is closed by reading with unmarshaller
-        String data = """
-                {"test": "data"}
-                """;
+        String data = "{\"test\": \"data\"";
         InputStream is = new ByteArrayInputStream(data.getBytes());
         Object out = template.requestBody("direct:unmarshallWithoutStreamCache", is, Object.class);
         Assertions.assertEquals(data, out);
@@ -74,9 +70,7 @@ public class OnExceptionUseOriginalMessageStreamTest extends ContextTestSupport
     @Test
     void unmarshallInvalidWithoutStreamCache() {
         // Uncached stream is closed by reading with unmarshaller
-        String data = """
-                {"test": "data
-                """;
+        String data = "{\"test\": \"data\"";
         InputStream is = new ByteArrayInputStream(data.getBytes());
         Object out = template.requestBody("direct:convertBodyInvalidUnmarshallWithoutStreamCache", is, Object.class);
         Assertions.assertEquals(data, out);