You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/06/23 01:53:55 UTC

cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/expression ExpressionSupport.java

jstrachan    2002/06/22 16:53:55

  Modified:    jelly/src/java/org/apache/commons/jelly/expression
                        ExpressionSupport.java
  Log:
  Added support for Enumeration in iteration expressions
  
  Revision  Changes    Path
  1.4       +10 -5     jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java
  
  Index: ExpressionSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ExpressionSupport.java	17 May 2002 15:18:15 -0000	1.3
  +++ ExpressionSupport.java	22 Jun 2002 23:53:55 -0000	1.4
  @@ -62,11 +62,13 @@
   package org.apache.commons.jelly.expression;
   
   import java.util.Collections;
  +import java.util.Enumeration;
   import java.util.Iterator;
   import java.util.List;
   import java.util.Map;
   
   import org.apache.commons.collections.ArrayIterator;
  +import org.apache.commons.collections.EnumerationIterator;
   import org.apache.commons.collections.SingletonIterator;
   
   import org.apache.commons.jelly.JellyContext;
  @@ -125,6 +127,9 @@
           }
           else if ( value.getClass().isArray() ) {
               return new ArrayIterator( value );
  +        }
  +        else if ( value instanceof Enumeration ) {
  +            return new EnumerationIterator((Enumeration ) value);
           }
           else {
               // XXX: should we return single iterator?
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>