diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/EndState.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/EndState.java index b0b77426..8a7f35ed 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/EndState.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/EndState.java @@ -150,7 +150,7 @@ public class EndState extends State { /** * Returns the subflow output map. This will invoke the output mapper (if any) * to map data available in the flow execution request context into a newly - * creaed empty map. + * created empty map. */ protected LocalAttributeMap createSessionOutput(RequestContext context) { LocalAttributeMap outputMap = new LocalAttributeMap(); diff --git a/spring-webflow/src/test/java/org/springframework/webflow/engine/builder/AbstractFlowBuilderParameterizationTests.java b/spring-webflow/src/test/java/org/springframework/webflow/engine/builder/AbstractFlowBuilderParameterizationTests.java index fd83a4c9..bafd3234 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/engine/builder/AbstractFlowBuilderParameterizationTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/engine/builder/AbstractFlowBuilderParameterizationTests.java @@ -18,12 +18,9 @@ package org.springframework.webflow.engine.builder; import junit.framework.TestCase; import org.springframework.beans.factory.support.StaticListableBeanFactory; -import org.springframework.webflow.core.collection.AttributeMap; import org.springframework.webflow.core.collection.LocalAttributeMap; import org.springframework.webflow.core.collection.MutableAttributeMap; -import org.springframework.webflow.definition.FlowDefinition; import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; -import org.springframework.webflow.definition.registry.StaticFlowDefinitionHolder; import org.springframework.webflow.engine.Flow; import org.springframework.webflow.execution.ViewSelection; import org.springframework.webflow.execution.support.ApplicationView; @@ -77,33 +74,24 @@ public class AbstractFlowBuilderParameterizationTests extends TestCase { public class TestFlowBuilder extends AbstractFlowBuilder { - public TestFlowBuilder(FlowServiceLocator serviceLocator) { - super(serviceLocator); - } - public void buildStates() throws FlowBuilderException { addActionState("test", action("testAction"), transition(on(success()), to("finish"))); addEndState("finish", "${activeFlow.attributes['name']}"); } } - public class TestFlowRegistryFactoryBean extends AbstractFlowBuildingFlowRegistryFactoryBean { + public class TestFlowRegistryFactoryBean extends AbstractFlowBuilderFlowRegistryFactoryBean { protected void doPopulate(FlowDefinitionRegistry registry) { MutableAttributeMap attributes = new LocalAttributeMap(); attributes.put("name", "A"); attributes.put("someKey", "someValue"); - registerFlow(registry, "flowA", attributes, new TestFlowBuilder(getFlowServiceLocator())); + registerFlowDefinition(registry, "flowA", attributes, new TestFlowBuilder()); attributes = new LocalAttributeMap(); attributes.put("name", "B"); attributes.put("someOtherKey", "someOtherValue"); - registerFlow(registry, "flowB", attributes, new TestFlowBuilder(getFlowServiceLocator())); - } - - private void registerFlow(FlowDefinitionRegistry registry, String flowId, AttributeMap attributes, FlowBuilder builder) { - FlowDefinition flow = new FlowAssembler(flowId, attributes, builder).assembleFlow(); - registry.registerFlowDefinition(new StaticFlowDefinitionHolder(flow)); + registerFlowDefinition(registry, "flowB", attributes, new TestFlowBuilder()); } }