Author: bayard
Date: Thu Jul 1 06:15:44 2010
New Revision: 959527
URL: http://svn.apache.org/viewvc?rev=959527&view=rev
Log:
Adding an exception when the type is not recognized in determineLengthAndType;
and removing some unused variables/commented out lines in the prepare method.
Thanks to Jeremy Boynes' patch to #49534
Modified:
tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/ForEachSupport.java
Modified:
tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/ForEachSupport.java
URL:
http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/ForEachSupport.java?rev=959527&r1=959526&r2=959527&view=diff
==============================================================================
---
tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/ForEachSupport.java
(original)
+++
tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/ForEachSupport.java
Thu Jul 1 06:15:44 2010
@@ -26,7 +26,6 @@ import java.util.StringTokenizer;
import javax.el.ELContext;
import javax.el.ValueExpression;
-import javax.el.VariableMapper;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.jstl.core.IndexedValueExpression;
import javax.servlet.jsp.jstl.core.IteratedExpression;
@@ -237,8 +236,8 @@ public abstract class ForEachSupport ext
length = st.countTokens();
isIndexedValueExpression = false;
} else {
- //What does this mean if we get here???
- length=0;
+ // unrecognized type
+ throw new
JspTagException(Resources.getMessage("FOREACH_BAD_ITEMS"));
}
}
}
@@ -268,10 +267,6 @@ public abstract class ForEachSupport ext
if (rawItems != null) {
if (rawItems instanceof ValueExpression) {
deferredExpression = (ValueExpression)rawItems;
- ELContext myELContext = pageContext.getELContext();
- VariableMapper vm = myELContext.getVariableMapper();
- //String itemsName=deferredExpression.getExpressionString();
- //vm.setVariable(itemsName, deferredExpression);
items = toDeferredForEachIterator(deferredExpression);
} else {
// extract an iterator over the 'items' we've got
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]