From d25d5bb3afdbf7af6bce22ca7b42fbd64234c415 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Thu, 5 Apr 2007 18:49:46 +0000 Subject: [PATCH] misc cleanup --- .../jsf/AbstractFlowExecutionPropertyResolver.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-webflow/src/main/java/org/springframework/webflow/executor/jsf/AbstractFlowExecutionPropertyResolver.java b/spring-webflow/src/main/java/org/springframework/webflow/executor/jsf/AbstractFlowExecutionPropertyResolver.java index b324b6b8..dc1b2356 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/executor/jsf/AbstractFlowExecutionPropertyResolver.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/executor/jsf/AbstractFlowExecutionPropertyResolver.java @@ -62,7 +62,7 @@ public abstract class AbstractFlowExecutionPropertyResolver extends PropertyReso public Class getType(Object base, int index) throws EvaluationException, PropertyNotFoundException { if (base instanceof FlowExecution) { - // can't access flow execution by index so we cannot determine type. Return null per JSF spec + // cannot access flow execution by index so we cannot determine type. Return null per JSF spec return null; } else { @@ -82,11 +82,11 @@ public abstract class AbstractFlowExecutionPropertyResolver extends PropertyReso } public Object getValue(Object base, int index) throws EvaluationException, PropertyNotFoundException { - if (!(base instanceof FlowExecution)) { - return resolverDelegate.getValue(base, index); + if (base instanceof FlowExecution) { + throw new ReferenceSyntaxException("Cannot apply an index value to a flow execution"); } else { - throw new ReferenceSyntaxException("Cannot apply an index value to a flow execution"); + return resolverDelegate.getValue(base, index); } } @@ -122,7 +122,7 @@ public abstract class AbstractFlowExecutionPropertyResolver extends PropertyReso public void setValue(Object base, int index, Object value) throws EvaluationException, PropertyNotFoundException { if (base instanceof FlowExecution) { - throw new ReferenceSyntaxException("Cannot apply an index value to flow scope"); + throw new ReferenceSyntaxException("Cannot apply an index value to a flow execution"); } else { resolverDelegate.setValue(base, index, value);