commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r618050 - /commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/ServletConfiguration.java
Date Sun, 03 Feb 2008 18:35:19 GMT
Author: oheger
Date: Sun Feb  3 10:35:17 2008
New Revision: 618050

URL: http://svn.apache.org/viewvc?rev=618050&view=rev
Log:
Removed dependency to commons-collections from ServletConfiguration and some Java 1.5-related
changes

Modified:
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/ServletConfiguration.java

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/ServletConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/ServletConfiguration.java?rev=618050&r1=618049&r2=618050&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/ServletConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/ServletConfiguration.java
Sun Feb  3 10:35:17 2008
@@ -17,12 +17,11 @@
 
 package org.apache.commons.configuration2.web;
 
+import java.util.Collections;
 import java.util.Iterator;
 import javax.servlet.Servlet;
 import javax.servlet.ServletConfig;
 
-import org.apache.commons.collections.iterators.EnumerationIterator;
-
 /**
  * A configuration wrapper around a {@link ServletConfig}. This configuration
  * is read only, adding or removing a property will throw an
@@ -63,8 +62,9 @@
         return handleDelimiters(config.getInitParameter(key));
     }
 
-    public Iterator getKeys()
+    @SuppressWarnings("unchecked")
+    public Iterator<String> getKeys()
     {
-        return new EnumerationIterator(config.getInitParameterNames());
+        return Collections.list(config.getInitParameterNames()).iterator();
     }
 }



Mime
View raw message