commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/expression ExpressionSupport.java
Date Sat, 22 Jun 2002 23:53:55 GMT
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:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message