cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r430729 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/wrapper/RequestWrapper.java
Date Fri, 11 Aug 2006 09:09:43 GMT
Author: cziegeler
Date: Fri Aug 11 02:09:42 2006
New Revision: 430729

URL: http://svn.apache.org/viewvc?rev=430729&view=rev
Log:
Use commons

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/wrapper/RequestWrapper.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/wrapper/RequestWrapper.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/wrapper/RequestWrapper.java?rev=430729&r1=430728&r2=430729&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/wrapper/RequestWrapper.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/wrapper/RequestWrapper.java
Fri Aug 11 02:09:42 2006
@@ -18,13 +18,13 @@
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
 import org.apache.cocoon.environment.Environment;
 import org.apache.cocoon.environment.Request;
 import org.apache.commons.collections.IteratorUtils;
+import org.apache.commons.collections.iterators.IteratorEnumeration;
 
 /**
  * This is a wrapper class for the <code>Request</code> object.
@@ -39,7 +39,7 @@
     private String queryString;
 
     /** The request parameters */
-    private final RequestParameters parameters ;
+    private final RequestParameters parameters;
 
     /** The environment */
     private final Environment environment;
@@ -110,21 +110,9 @@
             while (names.hasMoreElements()) {
                 parameterNames.add(names.nextElement());
             }
-            return new EnumerationFromIterator(parameterNames.iterator());
+            return new IteratorEnumeration(parameterNames.iterator());
         }
         return this.parameters.getParameterNames();
-    }
-
-    final class EnumerationFromIterator implements Enumeration {
-        private Iterator iter;
-        EnumerationFromIterator(Iterator iter) {
-            this.iter = iter;
-        }
-
-        public boolean hasMoreElements() {
-            return iter.hasNext();
-        }
-        public Object nextElement() { return iter.next(); }
     }
 
     /* (non-Javadoc)



Mime
View raw message