From 8ec2371e25e2c656ad56d5c5b551b62d3aebded4 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Thu, 16 Apr 2009 04:33:25 +0000 Subject: [PATCH] polish --- build-spring-webflow/resources/changelog.txt | 2 ++ .../springframework/webflow/test/MockExternalContext.java | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/build-spring-webflow/resources/changelog.txt b/build-spring-webflow/resources/changelog.txt index 99e3fb64..417eb2d2 100644 --- a/build-spring-webflow/resources/changelog.txt +++ b/build-spring-webflow/resources/changelog.txt @@ -19,6 +19,8 @@ Bug Fixes * Fixed bug where updating ViewState history could result in exceptions if no flow execution key was assigned or no snapshot had been taken (SWF-1099). Improvements +* Added userEventQueued and getUserEventState methods to View SPI, which simplified ViewState and View object interaction. + Custom View implementations will need to be updated to implement these new operations. See View's API JavaDocs and ViewState's doEnter and resume implementations. * Added org.springframework.webflow dm Server library definition for use in a dm Server deployment environment (SWF-1067) * Strengthened contract for response-related methods in ExternalContext. Specifically, calling any of the requestRedirect methods also now completes the response. If you attempt to complete a response more than once against an ExternalContext, an IllegalStateException is thrown. diff --git a/spring-webflow/src/main/java/org/springframework/webflow/test/MockExternalContext.java b/spring-webflow/src/main/java/org/springframework/webflow/test/MockExternalContext.java index 1e250195..17d62847 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/test/MockExternalContext.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/test/MockExternalContext.java @@ -432,7 +432,12 @@ public class MockExternalContext implements ExternalContext { throw new IllegalStateException( "A response is not allowed because an externalRedirect has already been requested on this ExternalContext"); } - throw new IllegalStateException("A response is not allowed"); + if (responseComplete) { + throw new IllegalStateException( + "A response is not allowed because one has already been completed on this ExternalContext"); + } else { + throw new IllegalStateException("A response is not allowed"); + } } }