From d5c7a28b5346f8c051885dd4f982119c4f1bd5fa Mon Sep 17 00:00:00 2001 From: Erwin Vervaet Date: Fri, 4 May 2007 09:01:24 +0000 Subject: [PATCH] Fixed serializability problems in ConversionException, EvaluationException and MethodInvocationException. --- .../binding/convert/ConversionException.java | 3 ++- .../binding/expression/EvaluationException.java | 5 +++-- .../binding/method/MethodInvocationException.java | 6 ++++-- spring-webflow/changelog.txt | 3 +++ 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/spring-binding/src/main/java/org/springframework/binding/convert/ConversionException.java b/spring-binding/src/main/java/org/springframework/binding/convert/ConversionException.java index f259b75b..b1a78505 100644 --- a/spring-binding/src/main/java/org/springframework/binding/convert/ConversionException.java +++ b/spring-binding/src/main/java/org/springframework/binding/convert/ConversionException.java @@ -31,8 +31,9 @@ public class ConversionException extends NestedRuntimeException { /** * The value we tried to convert. + * Transient because we cannot guarantee that the value is Serializable. */ - private Object value; + private transient Object value; /** * The target type we tried to convert to. diff --git a/spring-binding/src/main/java/org/springframework/binding/expression/EvaluationException.java b/spring-binding/src/main/java/org/springframework/binding/expression/EvaluationException.java index 13a7a501..e28e1160 100644 --- a/spring-binding/src/main/java/org/springframework/binding/expression/EvaluationException.java +++ b/spring-binding/src/main/java/org/springframework/binding/expression/EvaluationException.java @@ -25,9 +25,10 @@ import org.springframework.core.NestedRuntimeException; public class EvaluationException extends NestedRuntimeException { /** - * The evaluation attempt that failed. + * The evaluation attempt that failed. + * Transient because an EvaluationAttempt is not serializable. */ - private EvaluationAttempt evaluationAttempt; + private transient EvaluationAttempt evaluationAttempt; /** * Creates a new evaluation exception. diff --git a/spring-binding/src/main/java/org/springframework/binding/method/MethodInvocationException.java b/spring-binding/src/main/java/org/springframework/binding/method/MethodInvocationException.java index 88ac9bc5..764bf189 100644 --- a/spring-binding/src/main/java/org/springframework/binding/method/MethodInvocationException.java +++ b/spring-binding/src/main/java/org/springframework/binding/method/MethodInvocationException.java @@ -29,13 +29,15 @@ public class MethodInvocationException extends NestedRuntimeException { /** * The method signature. + * Transient because a MethodSignature is not Serializable. */ - private MethodSignature methodSignature; + private transient MethodSignature methodSignature; /** * The method invocation argument values. + * Transient because we cannot guarantee that the arguments are Serializable. */ - private Object[] arguments; + private transient Object[] arguments; /** * Signals that the method with the specified signature could not be invoked diff --git a/spring-webflow/changelog.txt b/spring-webflow/changelog.txt index efa9bd5d..4b916f9d 100644 --- a/spring-webflow/changelog.txt +++ b/spring-webflow/changelog.txt @@ -5,6 +5,9 @@ http://www.springframework.org Changes in version 1.1.0 () ------------------------------------- +Package org.springframework.binding +* Fixed serializability problems in ConversionException, EvaluationException and MethodInvocationException. + Package org.springframework.webflow.config * FlowExecutorFactoryBean now has an 'inputMapper' property to conveniently configure the 'inputMapper' property of the created FlowExecutorImpl object.