From ce85b64aa8fbcac2e7151d65265ecb5c3b65b5d8 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Tue, 23 Jul 2019 14:11:07 -0400 Subject: [PATCH] Improve RemoteFileTemplate invalid payload except. - include the invalid payload type --- .../integration/file/remote/RemoteFileTemplate.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/RemoteFileTemplate.java b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/RemoteFileTemplate.java index f6816983fe..e0e7e71d27 100644 --- a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/RemoteFileTemplate.java +++ b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/RemoteFileTemplate.java @@ -514,7 +514,9 @@ public class RemoteFileTemplate implements RemoteFileOperations, Initializ name = "InputStream payload"; } else { - throw new IllegalArgumentException("Unsupported payload type. The only supported payloads are " + + throw new IllegalArgumentException("Unsupported payload type [" + + payload.getClass().getName() + + "]. The only supported payloads are " + "java.io.File, java.lang.String, byte[], and InputStream"); } if (dataInputStream == null) {