From bdc5dd9f855b6948fd3a48fa31b0924d6befd310 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Wed, 24 Aug 2011 21:03:18 -0400 Subject: [PATCH] added check for IllegalStateException on unexpected exception thrown from method invcation --- .../integration/gateway/GatewayProxyFactoryBean.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java b/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java index 24f709fbf4..de5b7eb6de 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java @@ -315,8 +315,10 @@ public class GatewayProxyFactoryBean extends AbstractEndpoint implements Trackab throw t; } } - if ((t instanceof RuntimeException) && - !(t instanceof MessagingException) && !(t instanceof UndeclaredThrowableException)) { + if (t instanceof RuntimeException + && !(t instanceof MessagingException) + && !(t instanceof UndeclaredThrowableException) + && !(t instanceof IllegalStateException && ("Unexpected exception thrown").equals(t.getMessage()))) { throw t; } t = t.getCause();