commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r618051 - /commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/ServletContextConfiguration.java
Date Sun, 03 Feb 2008 18:37:56 GMT
Author: oheger
Date: Sun Feb  3 10:37:55 2008
New Revision: 618051

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

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

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/ServletContextConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/ServletContextConfiguration.java?rev=618051&r1=618050&r2=618051&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/ServletContextConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/ServletContextConfiguration.java
Sun Feb  3 10:37:55 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.ServletContext;
 
-import org.apache.commons.collections.iterators.EnumerationIterator;
-
 /**
  * A configuration wrapper to read the initialization parameters of a servlet
  * context. This configuration is read only, adding or removing a property will
@@ -64,8 +63,9 @@
         return handleDelimiters(context.getInitParameter(key));
     }
 
-    public Iterator getKeys()
+    @SuppressWarnings("unchecked")
+    public Iterator<String> getKeys()
     {
-        return new EnumerationIterator(context.getInitParameterNames());
+        return Collections.list(context.getInitParameterNames()).iterator();
     }
 }



Mime
View raw message