diff --git a/spring-webflow/changelog.txt b/spring-webflow/changelog.txt index 0ad5eadf..5a402c63 100644 --- a/spring-webflow/changelog.txt +++ b/spring-webflow/changelog.txt @@ -1,10 +1,15 @@ SPRING WEB FLOW (SWF) CHANGELOG =============================== -http://www.springframework.org +http://www.springframework.org/webflow -Changes in version 1.0.5 () +Changes in version 1.0.5 (21.08.2007) ------------------------------------- +Package org.springframework.webflow.engine +* Ensured the RequestContext attribute map can never be null (SWF-347). + +Package org.springframework.webflow.execution +* Made the Event class non-final to allow for extension (SWF-330). Changes in version 1.0.4 (13.06.2007) ------------------------------------- diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/RequestControlContextImpl.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/RequestControlContextImpl.java index d3b39003..3abd79dd 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/RequestControlContextImpl.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/RequestControlContextImpl.java @@ -55,35 +55,36 @@ class RequestControlContextImpl implements RequestControlContext { private static final Log logger = LogFactory.getLog(RequestControlContextImpl.class); /** - * The owning flow execution. + * The owning flow execution carrying out this request. */ private FlowExecutionImpl flowExecution; - /** - * The request scope data map. - */ - private LocalAttributeMap requestScope = new LocalAttributeMap(); - /** * A source context for the caller who initiated this request. */ private ExternalContext externalContext; /** - * The last event that occured in this request context. + * The request scope data map. Never null, initially empty. + */ + private LocalAttributeMap requestScope = new LocalAttributeMap(); + + /** + * Holder for contextual properties describing the currently executing request; never null, initially empty and + * immutable. + */ + private AttributeMap attributes = CollectionUtils.EMPTY_ATTRIBUTE_MAP; + + /** + * The last event that occurred in this request context; initially null. */ private Event lastEvent; /** - * The last transition that executed in this request context. + * The last transition that executed in this request context; initially null. */ private Transition lastTransition; - /** - * Holder for contextual execution properties. - */ - private AttributeMap attributes; - /** * Create a new request context. * @param flowExecution the owning flow execution @@ -91,8 +92,8 @@ class RequestControlContextImpl implements RequestControlContext { */ public RequestControlContextImpl(FlowExecutionImpl flowExecution, ExternalContext externalContext) { Assert.notNull(flowExecution, "The owning flow execution is required"); - this.externalContext = externalContext; this.flowExecution = flowExecution; + this.externalContext = externalContext; } // implementing RequestContext @@ -224,7 +225,7 @@ class RequestControlContextImpl implements RequestControlContext { // internal helpers /** - * Returns the execution listerns for the flow execution of this request context. + * Returns the execution listeners for the flow execution of this request context. */ protected FlowExecutionListeners getExecutionListeners() { return flowExecution.getListeners(); diff --git a/spring-webflow/src/main/java/org/springframework/webflow/test/MockRequestContext.java b/spring-webflow/src/main/java/org/springframework/webflow/test/MockRequestContext.java index 28d9f6ba..a6cf2b9a 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/test/MockRequestContext.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/test/MockRequestContext.java @@ -48,12 +48,12 @@ public class MockRequestContext implements RequestContext { private MutableAttributeMap requestScope = new LocalAttributeMap(); + private MutableAttributeMap attributes = new LocalAttributeMap(); + private Event lastEvent; private Transition lastTransition; - private MutableAttributeMap attributes = new LocalAttributeMap(); - /** * Creates a new mock request context with the following defaults: *