AbstractConversationFlowExecutionRepository.parseFlowExecutionKey() now throws an BadlyFormattedFlowExecutionKeyException when asked to parse an empty flow execution key (SWF-277).

This commit is contained in:
Erwin Vervaet
2007-04-01 18:28:15 +00:00
parent da0fc97c8e
commit 9884d075b0
2 changed files with 7 additions and 1 deletions

View File

@@ -50,6 +50,8 @@ Package org.springframework.webflow.execution
* Added FlowExecutionListener.sessionCreated(RequestContext, FlowSession) callback, useful for
setting flow attributes before the flow starts (SWF-223).
* ClientContinuationFlowExecutionRepository now uses 'URL-safe Base64 encoding' (SWF-270).
* AbstractConversationFlowExecutionRepository.parseFlowExecutionKey() now throws an
BadlyFormattedFlowExecutionKeyException when asked to parse an empty flow execution key (SWF-277).
Package org.springframework.webflow.executor
* Added resource URL encoding to redirects in a JSF environment (SWF-256).

View File

@@ -20,6 +20,7 @@ import java.io.Serializable;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.webflow.conversation.Conversation;
import org.springframework.webflow.conversation.ConversationException;
import org.springframework.webflow.conversation.ConversationId;
@@ -141,7 +142,10 @@ public abstract class AbstractConversationFlowExecutionRepository extends Abstra
}
public FlowExecutionKey parseFlowExecutionKey(String encodedKey) throws FlowExecutionRepositoryException {
Assert.hasText(encodedKey, "The string encoded flow execution key is required");
if (!StringUtils.hasText(encodedKey)) {
throw new BadlyFormattedFlowExecutionKeyException(encodedKey,
"The string encoded flow execution key is required");
}
String[] keyParts = CompositeFlowExecutionKey.keyParts(encodedKey);