You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ni...@apache.org on 2006/02/22 04:27:33 UTC

svn commit: r379665 - /struts/action/trunk/src/java/org/apache/struts/mock/MockMultipartRequestHandler.java

Author: niallp
Date: Tue Feb 21 19:27:32 2006
New Revision: 379665

URL: http://svn.apache.org/viewcvs?rev=379665&view=rev
Log:
Fix checkstyle issues.

Modified:
    struts/action/trunk/src/java/org/apache/struts/mock/MockMultipartRequestHandler.java

Modified: struts/action/trunk/src/java/org/apache/struts/mock/MockMultipartRequestHandler.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/src/java/org/apache/struts/mock/MockMultipartRequestHandler.java?rev=379665&r1=379664&r2=379665&view=diff
==============================================================================
--- struts/action/trunk/src/java/org/apache/struts/mock/MockMultipartRequestHandler.java (original)
+++ struts/action/trunk/src/java/org/apache/struts/mock/MockMultipartRequestHandler.java Tue Feb 21 19:27:32 2006
@@ -1,14 +1,14 @@
 /*
- * $Id$ 
+ * $Id$
  *
  * Copyright 2006 The Apache Software Foundation.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,13 +33,19 @@
  */
 public class MockMultipartRequestHandler implements MultipartRequestHandler {
 
+    /** mock ActionServlet instance. */
     private ActionServlet servlet;
+
+    /** mock ActionMapping instance. */
     private ActionMapping mapping = new ActionMapping();
+
+    /** request elements. */
     private Hashtable elements;
 
     /**
      * Convienience method to set a reference to a mock
      * ActionServlet instance.
+     * @param servlet Mock servlet instance.
      */
     public void setServlet(ActionServlet servlet) {
         this.servlet = servlet;
@@ -48,20 +54,23 @@
     /**
      * Convienience method to set a reference to a mock
      * ActionMapping instance.
+     * @param mapping Mock action mapping instance.
      */
     public void setMapping(ActionMapping mapping) {
         this.mapping = mapping;
     }
 
     /**
-     * Get the mock ActionServlet instance
+     * Get the mock ActionServlet instance.
+     * @return The mock servlet instance.
      */
     public ActionServlet getServlet() {
         return this.servlet;
     }
 
     /**
-     * Get the ActionMapping instance for this mock request
+     * Get the ActionMapping instance for this mock request.
+     * @return The mock action mapping instance.
      */
     public ActionMapping getMapping() {
         return this.mapping;
@@ -71,13 +80,16 @@
       * <p>Mock parsing of the ServletInputStream.</p>
       *
       * <p>Constructs a <code>Hashtable</code> of elements
-      *    from the HttpServletRequest's parameters - no 
-      *    <code>FormFile</code> elements are created.</p> 
+      *    from the HttpServletRequest's parameters - no
+      *    <code>FormFile</code> elements are created.</p>
+      * @param request Mock request instance.
+      * @throws ServletException If there is a problem with
+      * processing the request.
       */
     public void handleRequest(HttpServletRequest request) throws ServletException {
         elements = new Hashtable();
         Enumeration enum = request.getParameterNames();
-        while(enum.hasMoreElements()) {
+        while (enum.hasMoreElements()) {
             String key = enum.nextElement().toString();
             elements.put(key, request.getParameter(key));
         }
@@ -93,12 +105,12 @@
     public Hashtable getTextElements() {
         return this.elements;
     }
-    
+
     /**
      * <p>This method is called on to retrieve all the FormFile
      * input elements of the request.</p>
      *
-     * @return This mock implementation returns an empty 
+     * @return This mock implementation returns an empty
      *    <code>Hashtable</code>
      */
     public Hashtable getFileElements() {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org