cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anathan...@apache.org
Subject svn commit: r1154304 - /cocoon/cocoon3/trunk/cocoon-sample/src/test/java/org/apache/cocoon/profiling/MockXMLSitemapServlet.java
Date Fri, 05 Aug 2011 16:43:39 GMT
Author: anathaniel
Date: Fri Aug  5 16:43:39 2011
New Revision: 1154304

URL: http://svn.apache.org/viewvc?rev=1154304&view=rev
Log:
Limit scope of @SuppressWarnings("unchecked")

Modified:
    cocoon/cocoon3/trunk/cocoon-sample/src/test/java/org/apache/cocoon/profiling/MockXMLSitemapServlet.java

Modified: cocoon/cocoon3/trunk/cocoon-sample/src/test/java/org/apache/cocoon/profiling/MockXMLSitemapServlet.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sample/src/test/java/org/apache/cocoon/profiling/MockXMLSitemapServlet.java?rev=1154304&r1=1154303&r2=1154304&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sample/src/test/java/org/apache/cocoon/profiling/MockXMLSitemapServlet.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-sample/src/test/java/org/apache/cocoon/profiling/MockXMLSitemapServlet.java
Fri Aug  5 16:43:39 2011
@@ -112,11 +112,13 @@ class MockXMLSitemapServlet extends Http
         return request.getRequestURI().substring(contextPath.length() + mountPath.length());
     }
 
-    @SuppressWarnings("unchecked")
     private Map<String, Object> getInvocationParameters(HttpServletRequest req) {
         Map<String, Object> invocationParameters = new HashMap<String, Object>();
 
-        for (Enumeration<String> names = req.getParameterNames(); names.hasMoreElements();)
{
+        @SuppressWarnings("unchecked")
+        Enumeration<String> names = req.getParameterNames();
+
+        while (names.hasMoreElements()) {
             String name = names.nextElement();
             invocationParameters.put(name, req.getParameter(name));
         }



Mime
View raw message