diff --git a/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/ServletExternalContext.java b/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/ServletExternalContext.java index cb370370..2b49b786 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/ServletExternalContext.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/ServletExternalContext.java @@ -276,7 +276,7 @@ public class ServletExternalContext implements ExternalContext { public void executeFlowRequest(FlowExecutor flowExecutor) throws IOException { ExternalContextHolder.setExternalContext(this); try { - flowExecutor.execute(this); + flowExecutor.executeFlowRequest(this); if (isPausedResult()) { if (flowExecutionRedirector != null) { flowExecutionRedirector.issueRedirect(); diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/Flow.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/Flow.java index 6a1ee352..2a7788a7 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/Flow.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/Flow.java @@ -16,13 +16,13 @@ package org.springframework.webflow.engine; import java.util.Iterator; +import java.util.LinkedHashSet; import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.binding.mapping.AttributeMapper; import org.springframework.binding.mapping.MappingContext; -import org.springframework.core.CollectionFactory; import org.springframework.core.style.StylerUtils; import org.springframework.core.style.ToStringCreator; import org.springframework.util.Assert; @@ -38,8 +38,8 @@ import org.springframework.webflow.execution.RequestContext; /** * A single flow definition. A Flow definition is a reusable, self-contained controller module that provides the blue - * print for a user dialog or conversation. Flows typically orchestrate controlled navigations within web applications - * to guide users through fulfillment of a business process/goal that takes place over a series of steps, modeled as + * print for a user dialog or conversation. Flows typically drive controlled navigations within web applications to + * guide users through fulfillment of a business process/goal that takes place over a series of steps, modeled as * states. *

* A simple Flow definition could do nothing more than execute an action and display a view all in one request. A more @@ -115,7 +115,7 @@ public class Flow extends AnnotatedObject implements FlowDefinition { /** * The set of state definitions for this flow. */ - private Set states = CollectionFactory.createLinkedSetIfPossible(9); + private Set states = new LinkedHashSet(9); /** * The default start state for this flow. @@ -125,7 +125,7 @@ public class Flow extends AnnotatedObject implements FlowDefinition { /** * The set of flow variables created by this flow. */ - private Set variables = CollectionFactory.createLinkedSetIfPossible(3); + private Set variables = new LinkedHashSet(3); /** * The mapper to map flow input attributes. diff --git a/spring-webflow/src/main/java/org/springframework/webflow/execution/factory/ConditionalFlowExecutionListenerHolder.java b/spring-webflow/src/main/java/org/springframework/webflow/execution/factory/ConditionalFlowExecutionListenerHolder.java index ce6ab22c..50bddbdb 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/execution/factory/ConditionalFlowExecutionListenerHolder.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/execution/factory/ConditionalFlowExecutionListenerHolder.java @@ -16,9 +16,9 @@ package org.springframework.webflow.execution.factory; import java.util.Iterator; +import java.util.LinkedHashSet; import java.util.Set; -import org.springframework.core.CollectionFactory; import org.springframework.util.Assert; import org.springframework.webflow.definition.FlowDefinition; import org.springframework.webflow.execution.FlowExecutionListener; @@ -42,7 +42,7 @@ class ConditionalFlowExecutionListenerHolder { /** * The listener criteria set. */ - private Set criteriaSet = CollectionFactory.createLinkedSetIfPossible(3); + private Set criteriaSet = new LinkedHashSet(3); /** * Create a new conditional flow execution listener holder. diff --git a/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutor.java b/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutor.java index 3774a92a..2a18cf14 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutor.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutor.java @@ -33,5 +33,5 @@ public interface FlowExecutor { * Execute the flow request initiated by the provided external context. * @param context the external context, representing a client environment calling into Spring Web Flow */ - public void execute(ExternalContext context); + public void executeFlowRequest(ExternalContext context); } \ No newline at end of file diff --git a/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutorImpl.java b/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutorImpl.java index 33fb1842..121021f8 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutorImpl.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutorImpl.java @@ -101,7 +101,7 @@ public class FlowExecutorImpl implements FlowExecutor { this.executionRepository = executionRepository; } - public void execute(ExternalContext context) { + public void executeFlowRequest(ExternalContext context) { if (context.getFlowExecutionKey() != null) { resumeExecution(context.getFlowExecutionKey(), context); } else { diff --git a/spring-webflow/src/test/java/org/springframework/webflow/config/EnableScopesBeanDefinitionParserTests.java b/spring-webflow/src/test/java/org/springframework/webflow/config/EnableScopesBeanDefinitionParserTests.java index 55e46723..35b9fb24 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/config/EnableScopesBeanDefinitionParserTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/config/EnableScopesBeanDefinitionParserTests.java @@ -24,7 +24,7 @@ public class EnableScopesBeanDefinitionParserTests extends TestCase { public void testExecute() { MockExternalContext context = new MockExternalContext(); context.setFlowId("flow"); - executor.execute(context); + executor.executeFlowRequest(context); } public static class ConfigurationListener extends FlowExecutionListenerAdapter { diff --git a/spring-webflow/src/test/java/org/springframework/webflow/config/FlowExecutorBeanDefinitionParserTests.java b/spring-webflow/src/test/java/org/springframework/webflow/config/FlowExecutorBeanDefinitionParserTests.java index 235096fc..4f011381 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/config/FlowExecutorBeanDefinitionParserTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/config/FlowExecutorBeanDefinitionParserTests.java @@ -21,7 +21,7 @@ public class FlowExecutorBeanDefinitionParserTests extends TestCase { public void testExecute() { MockExternalContext context = new MockExternalContext(); context.setFlowId("flow"); - executor.execute(context); + executor.executeFlowRequest(context); } public static class ConfigurationListener extends FlowExecutionListenerAdapter { diff --git a/spring-webflow/src/test/java/org/springframework/webflow/config/FlowExecutorFactoryBeanTests.java b/spring-webflow/src/test/java/org/springframework/webflow/config/FlowExecutorFactoryBeanTests.java index da75667b..8554abdb 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/config/FlowExecutorFactoryBeanTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/config/FlowExecutorFactoryBeanTests.java @@ -51,7 +51,7 @@ public class FlowExecutorFactoryBeanTests extends TestCase { FlowExecutor executor = (FlowExecutor) factoryBean.getObject(); MockExternalContext context = new MockExternalContext(); context.setFlowId("flow"); - executor.execute(context); + executor.executeFlowRequest(context); } public void testGetFlowExecutorOptionsSpecified() throws Exception { @@ -79,10 +79,10 @@ public class FlowExecutorFactoryBeanTests extends TestCase { FlowExecutor executor = (FlowExecutor) factoryBean.getObject(); MockExternalContext context = new MockExternalContext(); context.setFlowId("flow"); - executor.execute(context); + executor.executeFlowRequest(context); MockExternalContext context2 = new MockExternalContext(); context2.setFlowExecutionKey(context.getFlowExecutionKey()); - executor.execute(context); + executor.executeFlowRequest(context); } } diff --git a/spring-webflow/src/test/java/org/springframework/webflow/context/RequestPathTests.java b/spring-webflow/src/test/java/org/springframework/webflow/context/RequestPathTests.java index 07fdf65d..1cb30908 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/context/RequestPathTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/context/RequestPathTests.java @@ -2,8 +2,6 @@ package org.springframework.webflow.context; import junit.framework.TestCase; -import org.springframework.webflow.context.RequestPath; - public class RequestPathTests extends TestCase { public void testNewPathParse() { RequestPath path = new RequestPath("/users/1"); @@ -21,7 +19,7 @@ public class RequestPathTests extends TestCase { public void testNewPathParseNoLeadingSlash() { try { - RequestPath path = new RequestPath("users/1/"); + new RequestPath("users/1/"); fail("should have failed"); } catch (IllegalArgumentException e) { diff --git a/spring-webflow/src/test/java/org/springframework/webflow/context/servlet/ServletExternalContextTests.java b/spring-webflow/src/test/java/org/springframework/webflow/context/servlet/ServletExternalContextTests.java index 14e1244d..4657487f 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/context/servlet/ServletExternalContextTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/context/servlet/ServletExternalContextTests.java @@ -114,7 +114,7 @@ public class ServletExternalContextTests extends TestCase { public void testSendFlowExecutionRedirect() throws Exception { request.setPathInfo("/users/1"); flowExecutor = new FlowExecutor() { - public void execute(ExternalContext context) { + public void executeFlowRequest(ExternalContext context) { context.sendFlowExecutionRedirect(new FlowExecutionRequestInfo("users", "_c12345_k12345")); } }; @@ -126,7 +126,7 @@ public class ServletExternalContextTests extends TestCase { public void testFlowExecutionRedirectAttemptOnEnd() throws Exception { request.setPathInfo("/users/1"); flowExecutor = new FlowExecutor() { - public void execute(ExternalContext context) { + public void executeFlowRequest(ExternalContext context) { context.sendFlowExecutionRedirect(new FlowExecutionRequestInfo("users", "_c12345_k12345")); context.setEndedResult("_c12345_k12345"); } @@ -143,7 +143,7 @@ public class ServletExternalContextTests extends TestCase { public void testSendFlowDefinitionRedirect() throws Exception { request.setPathInfo("/users/1"); flowExecutor = new FlowExecutor() { - public void execute(ExternalContext context) { + public void executeFlowRequest(ExternalContext context) { MockParameterMap parameters = new MockParameterMap(); parameters.put("foo", "bar"); parameters.put("bar", "baz"); @@ -162,7 +162,7 @@ public class ServletExternalContextTests extends TestCase { public void testSendExternalRedirect() throws Exception { request.setPathInfo("/users/1"); flowExecutor = new FlowExecutor() { - public void execute(ExternalContext context) { + public void executeFlowRequest(ExternalContext context) { context.sendExternalRedirect("/foo/bar/baz"); context.setEndedResult(null); } @@ -173,7 +173,7 @@ public class ServletExternalContextTests extends TestCase { } public class StubFlowExecutor implements FlowExecutor { - public void execute(ExternalContext context) { + public void executeFlowRequest(ExternalContext context) { assertNotNull(ExternalContextHolder.getExternalContext()); } } diff --git a/spring-webflow/src/test/java/org/springframework/webflow/executor/FlowExecutorImplTests.java b/spring-webflow/src/test/java/org/springframework/webflow/executor/FlowExecutorImplTests.java index 274c5b99..edd85c4d 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/executor/FlowExecutorImplTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/executor/FlowExecutorImplTests.java @@ -40,7 +40,7 @@ public class FlowExecutorImplTests extends TestCase { context.setFlowId("flow"); ExternalContextHolder.setExternalContext(context); - executor.execute(context); + executor.executeFlowRequest(context); ExternalContextHolder.setExternalContext(null); assertNull(context.getFlowExecutionRedirectResult()); @@ -56,7 +56,7 @@ public class FlowExecutorImplTests extends TestCase { context.setFlowId("flow"); ExternalContextHolder.setExternalContext(context); - executor.execute(context); + executor.executeFlowRequest(context); ExternalContextHolder.setExternalContext(null); assertNotNull(context.getPausedFlowExecutionKeyResult()); @@ -69,7 +69,7 @@ public class FlowExecutorImplTests extends TestCase { context2.setFlowExecutionKey(context.getPausedFlowExecutionKeyResult()); ExternalContextHolder.setExternalContext(context); - executor.execute(context2); + executor.executeFlowRequest(context2); ExternalContextHolder.setExternalContext(null); } @@ -86,7 +86,7 @@ public class FlowExecutorImplTests extends TestCase { context.setFlowId("flow"); ExternalContextHolder.setExternalContext(context); - executor.execute(context); + executor.executeFlowRequest(context); ExternalContextHolder.setExternalContext(null); assertNull(context.getFlowExecutionRedirectResult());