You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by fm...@apache.org on 2026/08/28 11:42:29 UTC
(camel-spring-boot) branch fix/CAMEL-24504 created (now 3b9c82fd9fc)
This is an automated email from the ASF dual-hosted git repository.
Croway pushed a change to branch fix/CAMEL-24504
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
at 3b9c82fd9fc CAMEL-24504: preserve StringReader conversion
This branch includes the following new commits:
new 3b9c82fd9fc CAMEL-24504: preserve StringReader conversion
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(camel-spring-boot) 01/01: CAMEL-24504: preserve StringReader conversion
Posted by fm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
Croway pushed a commit to branch fix/CAMEL-24504
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
commit 3b9c82fd9fc7d586678bf577cb5566f2e967e93d
Author: Croway <fe...@gmail.com>
AuthorDate: Fri Aug 28 13:42:13 2026 +0200
CAMEL-24504: preserve StringReader conversion
---
.../main/java/org/apache/camel/spring/boot/SpringTypeConverter.java | 4 ++--
.../java/org/apache/camel/spring/boot/SpringTypeConverterTest.java | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringTypeConverter.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringTypeConverter.java
index dee756a74cc..fef6ff7186a 100644
--- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringTypeConverter.java
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringTypeConverter.java
@@ -16,8 +16,8 @@
*/
package org.apache.camel.spring.boot;
+import java.io.FileReader;
import java.io.InputStream;
-import java.io.Reader;
import java.io.Writer;
import java.util.Collection;
import java.util.List;
@@ -94,7 +94,7 @@ public class SpringTypeConverter extends TypeConverterSupport {
private boolean isFileBackedTarget(Class<?> type) {
return InputStream.class.isAssignableFrom(type)
- || Reader.class.isAssignableFrom(type)
+ || FileReader.class.isAssignableFrom(type)
|| Writer.class.isAssignableFrom(type)
|| ZipFile.class.isAssignableFrom(type);
}
diff --git a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/SpringTypeConverterTest.java b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/SpringTypeConverterTest.java
index 7182b127659..27c842656d9 100644
--- a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/SpringTypeConverterTest.java
+++ b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/SpringTypeConverterTest.java
@@ -21,7 +21,7 @@ import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.InputStream;
-import java.io.Reader;
+import java.io.StringReader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
@@ -99,8 +99,8 @@ public class SpringTypeConverterTest {
}
@Test
- public void testStringToReaderConversionIsBlocked() {
- Assertions.assertNull(converter.convertTo(Reader.class, null, "some file content"));
+ public void testStringToStringReaderConversionIsStillAllowed() {
+ Assertions.assertNotNull(converter.convertTo(StringReader.class, null, "some file content"));
}
@Test