You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2011/12/06 21:56:42 UTC
svn commit: r1211128 -
/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletConfiguration.java
Author: oheger
Date: Tue Dec 6 20:56:41 2011
New Revision: 1211128
URL: http://svn.apache.org/viewvc?rev=1211128&view=rev
Log:
Java 1.5 compatibility: raw types, etc.
Modified:
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletConfiguration.java
Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletConfiguration.java?rev=1211128&r1=1211127&r2=1211128&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletConfiguration.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletConfiguration.java Tue Dec 6 20:56:41 2011
@@ -18,7 +18,9 @@
package org.apache.commons.configuration.web;
import java.util.Collections;
+import java.util.Enumeration;
import java.util.Iterator;
+
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
@@ -28,12 +30,12 @@ import javax.servlet.ServletConfig;
* UnsupportedOperationException.
*
* @author <a href="mailto:ebourg@apache.org">Emmanuel Bourg</a>
- * @version $Revision$, $Date$
+ * @version $Id$
* @since 1.1
*/
public class ServletConfiguration extends BaseWebConfiguration
{
- /** Stores a reference to the wrapped <code>ServletConfig</code>.*/
+ /** Stores a reference to the wrapped {@code ServletConfig}.*/
protected ServletConfig config;
/**
@@ -62,8 +64,12 @@ public class ServletConfiguration extend
return handleDelimiters(config.getInitParameter(key));
}
- public Iterator getKeys()
+ public Iterator<String> getKeys()
{
- return Collections.list(config.getInitParameterNames()).iterator();
+ // According to the documentation of getInitParameterNames() the
+ // enumeration is of type String.
+ @SuppressWarnings("unchecked")
+ Enumeration<String> en = config.getInitParameterNames();
+ return Collections.list(en).iterator();
}
}