From 2916da30ddc25b5eda05b6d362f90d4847c54ef9 Mon Sep 17 00:00:00 2001 From: Pascal Schumacher Date: Wed, 25 Dec 2019 15:00:31 +0100 Subject: [PATCH] Improve formatting of IllegalArgumentException message thrown by DefaultExecutionContextSerializer --- .../repository/dao/DefaultExecutionContextSerializer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java index dcec66fc2..ca3aeb74a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java @@ -60,8 +60,8 @@ public class DefaultExecutionContextSerializer implements ExecutionContextSerial Assert.notNull(value, "A null value was found"); if (!(value instanceof Serializable)) { throw new IllegalArgumentException( - "Value: [ " + value + "must be serializable." - + "Object of class [" + value.getClass().getName() + "Value: [" + value + "] must be serializable. " + + "Object of class: [" + value.getClass().getName() + "] must be an instance of " + Serializable.class); } }