You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ma...@apache.org on 2005/05/14 07:09:33 UTC

svn commit: r170121 - in /struts/core/trunk/src/share/org/apache/struts: ./ action/

Author: martinc
Date: Fri May 13 22:09:32 2005
New Revision: 170121

URL: http://svn.apache.org/viewcvs?rev=170121&view=rev
Log:
Fix a few hundred Checkstyle problems.

Modified:
    struts/core/trunk/src/share/org/apache/struts/Globals.java
    struts/core/trunk/src/share/org/apache/struts/action/Action.java
    struts/core/trunk/src/share/org/apache/struts/action/ActionError.java
    struts/core/trunk/src/share/org/apache/struts/action/ActionErrors.java
    struts/core/trunk/src/share/org/apache/struts/action/ActionForm.java
    struts/core/trunk/src/share/org/apache/struts/action/ActionFormBean.java
    struts/core/trunk/src/share/org/apache/struts/action/ActionForward.java
    struts/core/trunk/src/share/org/apache/struts/action/ActionMapping.java
    struts/core/trunk/src/share/org/apache/struts/action/ActionMessage.java
    struts/core/trunk/src/share/org/apache/struts/action/ActionMessages.java
    struts/core/trunk/src/share/org/apache/struts/action/ActionRedirect.java
    struts/core/trunk/src/share/org/apache/struts/action/ActionServlet.java
    struts/core/trunk/src/share/org/apache/struts/action/DynaActionForm.java
    struts/core/trunk/src/share/org/apache/struts/action/DynaActionFormClass.java
    struts/core/trunk/src/share/org/apache/struts/action/ExceptionHandler.java
    struts/core/trunk/src/share/org/apache/struts/action/PlugIn.java
    struts/core/trunk/src/share/org/apache/struts/action/RequestProcessor.java

Modified: struts/core/trunk/src/share/org/apache/struts/Globals.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/Globals.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/Globals.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/Globals.java Fri May 13 22:09:32 2005
@@ -181,8 +181,8 @@
         "org.apache.struts.action.TOKEN";
 
     /**
-     * The page attributes key under which xhtml status is stored.  This may be "true"
-     * or "false".  When set to true, the html tags output xhtml.
+     * The page attributes key under which xhtml status is stored.  This may be
+     * "true" or "false".  When set to true, the html tags output xhtml.
      * @since Struts 1.1
      */
     public static final String XHTML_KEY =

Modified: struts/core/trunk/src/share/org/apache/struts/action/Action.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/Action.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/Action.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/Action.java Fri May 13 22:09:32 2005
@@ -35,11 +35,11 @@
 import org.apache.struts.util.TokenProcessor;
 
 /**
- * <p>An <strong>Action</strong> is an adapter between the contents of an incoming
- * HTTP request and the corresponding business logic that should be executed to
- * process this request. The controller (RequestProcessor) will select an
- * appropriate Action for each request, create an instance (if necessary),
- * and call the <code>execute</code> method.</p>
+ * <p>An <strong>Action</strong> is an adapter between the contents of an
+ * incoming HTTP request and the corresponding business logic that should be
+ * executed to process this request. The controller (RequestProcessor) will
+ * select an appropriate Action for each request, create an instance (if
+ * necessary), and call the <code>execute</code> method.</p>
  *
  * <p>Actions must be programmed in a thread-safe manner, because the
  * controller will share the same instance for multiple simultaneous
@@ -68,11 +68,13 @@
 public class Action {
 
     /**
-     * <p>An instance of <code>TokenProcessor</code> to use for token functionality.</p>
+     * <p>An instance of <code>TokenProcessor</code> to use for token
+     * functionality.</p>
      */
     private static TokenProcessor token = TokenProcessor.getInstance();
-    // :TODO: We can make this variable protected and remove Action's token methods
-    // or leave it private and allow the token methods to delegate their calls.
+    // :TODO: We can make this variable protected and remove Action's token
+    // methods or leave it private and allow the token methods to delegate
+    // their calls.
 
 
     // ----------------------------------------------------- Instance Variables
@@ -99,6 +101,8 @@
 
     /**
      * <p>Return the servlet instance to which we are attached.</p>
+     *
+     * @return The servlet instance to which we are attached.
      */
     public ActionServlet getServlet() {
 
@@ -142,6 +146,8 @@
      * @param form The optional ActionForm bean for this request (if any)
      * @param request The non-HTTP request we are processing
      * @param response The non-HTTP response we are creating
+     * @return The forward to which control should be transferred, or
+     *         <code>null</code> if the response has been completed.
      *
      * @exception Exception if the application business logic throws
      *  an exception.
@@ -180,6 +186,8 @@
      * @param form The optional ActionForm bean for this request (if any)
      * @param request The HTTP request we are processing
      * @param response The HTTP response we are creating
+     * @return The forward to which control should be transferred, or
+     *         <code>null</code> if the response has been completed.
      *
      * @exception Exception if the application business logic throws
      *  an exception
@@ -221,7 +229,8 @@
         }
 
         // get any existing messages from the request, or make a new one
-        ActionMessages requestMessages = (ActionMessages) request.getAttribute(Globals.MESSAGE_KEY);
+        ActionMessages requestMessages =
+                (ActionMessages) request.getAttribute(Globals.MESSAGE_KEY);
         if (requestMessages == null) {
             requestMessages = new ActionMessages();
         }
@@ -259,7 +268,8 @@
         }
 
         // get any existing errors from the request, or make a new one
-        ActionMessages requestErrors = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
+        ActionMessages requestErrors =
+                (ActionMessages) request.getAttribute(Globals.ERROR_KEY);
         if (requestErrors == null) {
             requestErrors = new ActionMessages();
         }
@@ -282,6 +292,7 @@
      * request for a particular transaction.</p>
      *
      * @param request The request we are processing
+     * @return The new transaction token.
      */
     protected String generateToken(HttpServletRequest request) {
         return token.generateToken(request);
@@ -289,11 +300,14 @@
 
 
     /**
-     * Retrieves any existing errors placed in the request by previous actions.  This method could be called instead
-     * of creating a <code>new ActionMessages()<code> at the beginning of an <code>Action<code>
-     * This will prevent saveErrors() from wiping out any existing Errors
+     * Retrieves any existing errors placed in the request by previous actions.
+     * This method could be called instead of creating a
+     * <code>new ActionMessages()</code> at the beginning of an
+     * <code>Action</code>. This will prevent saveErrors() from wiping out any
+     * existing Errors
      *
-     * @return the Errors that already exist in the request, or a new ActionMessages object if empty.
+     * @return the Errors that already exist in the request, or a new
+     *         ActionMessages object if empty.
      * @param request The servlet request we are processing
      * @since Struts 1.2.1
      */
@@ -311,6 +325,7 @@
      * <p>Return the user's currently selected Locale.</p>
      *
      * @param request The request we are processing
+     * @return The user's currently selected Locale.
      */
     protected Locale getLocale(HttpServletRequest request) {
 
@@ -320,11 +335,14 @@
 
 
     /**
-     * Retrieves any existing messages placed in the request by previous actions.  This method could be called instead
-     * of creating a <code>new ActionMessages()<code> at the beginning of an <code>Action<code>
-     * This will prevent saveMessages() from wiping out any existing Messages
+     * Retrieves any existing messages placed in the request by previous
+     * actions. This method could be called instead of creating a
+     * <code>new ActionMessages()</code> at the beginning of an
+     * <code>Action</code> This will prevent saveMessages() from wiping out any
+     * existing Messages
      *
-     * @return the Messages that already exist in the request, or a new ActionMessages object if empty.
+     * @return the Messages that already exist in the request, or a new
+     *         ActionMessages object if empty.
      * @param request The servlet request we are processing
      * @since Struts 1.2.1
      */
@@ -342,6 +360,7 @@
      * <p>Return the default message resources for the current module.</p>
      *
      * @param request The servlet request we are processing
+     * @return The default message resources for the current module.
      * @since Struts 1.1
      */
     protected MessageResources getResources(HttpServletRequest request) {
@@ -356,8 +375,9 @@
      *
      * @param request The servlet request we are processing
      * @param key The key specified in the
-     *  <code>&lt;message-resources&gt;</code> element for the
-     *  requested bundle
+     *            <code>&lt;message-resources&gt;</code> element for the
+     *            requested bundle.
+     * @return The specified message resource for the current module.
      *
      * @since Struts 1.1
      */
@@ -387,6 +407,8 @@
      * will have been skipped by the controller servlet.</p>
      *
      * @param request The servlet request we are processing
+     * @return <code>true</code> if the cancel button was pressed;
+     *         <code>false</code> otherwise.
      * @see org.apache.struts.taglib.html.CancelTag
      */
     protected boolean isCancelled(HttpServletRequest request) {
@@ -410,6 +432,8 @@
      * </ul>
      *
      * @param request The servlet request we are processing
+     * @return <code>true</code> if there is a transaction token and it is
+     *         valid; <code>false</code> otherwise.
      */
     protected boolean isTokenValid(HttpServletRequest request) {
 
@@ -433,6 +457,8 @@
      *
      * @param request The servlet request we are processing
      * @param reset Should we reset the token after checking it?
+     * @return <code>true</code> if there is a transaction token and it is
+     *         valid; <code>false</code> otherwise.
      */
     protected boolean isTokenValid(HttpServletRequest request, boolean reset) {
 
@@ -468,7 +494,7 @@
      */
     protected void saveErrors(HttpServletRequest request, ActionErrors errors) {
 
-        this.saveErrors(request,(ActionMessages)errors);
+        this.saveErrors(request, (ActionMessages) errors);
         // :TODO: Remove after Struts 1.2.
 
     }
@@ -484,7 +510,8 @@
      * @param errors Error messages object
      * @since Struts 1.2
      */
-    protected void saveErrors(HttpServletRequest request, ActionMessages errors) {
+    protected void saveErrors(HttpServletRequest request,
+            ActionMessages errors) {
 
         // Remove any error messages attribute if none are required
         if ((errors == null) || errors.isEmpty()) {

Modified: struts/core/trunk/src/share/org/apache/struts/action/ActionError.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ActionError.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ActionError.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ActionError.java Fri May 13 22:09:32 2005
@@ -33,10 +33,12 @@
  * syntax used by the JDK <code>MessageFormat</code> class. Thus, the first
  * placeholder is '{0}', the second is '{1}', etc.</p>
  *
- * <p>Since Struts 1.1 <code>ActionError</code> extends <code>ActionMessage</code>.
+ * <p>Since Struts 1.1 <code>ActionError</code> extends
+ * <code>ActionMessage</code>.
  *
  * @version $Rev$ $Date$
- * @deprecated Please use <code>ActionMessage</code> instead, deprecated since 1.2.0.
+ * @deprecated Please use <code>ActionMessage</code> instead, deprecated
+ * since 1.2.0.
  */
 public class ActionError extends ActionMessage implements Serializable {
 

Modified: struts/core/trunk/src/share/org/apache/struts/action/ActionErrors.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ActionErrors.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ActionErrors.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ActionErrors.java Fri May 13 22:09:32 2005
@@ -50,7 +50,8 @@
      * @deprecated Use ActionMessages.GLOBAL_MESSAGE instead.  This will be
      * removed after Struts 1.2.
      */
-    public static final String GLOBAL_ERROR = "org.apache.struts.action.GLOBAL_ERROR";
+    public static final String GLOBAL_ERROR =
+            "org.apache.struts.action.GLOBAL_ERROR";
 
     // --------------------------------------------------------- Public Methods
 

Modified: struts/core/trunk/src/share/org/apache/struts/action/ActionForm.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ActionForm.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ActionForm.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ActionForm.java Fri May 13 22:09:32 2005
@@ -82,6 +82,8 @@
 
     /**
      * <p>Return the servlet instance to which we are attached.</p>
+     *
+     * @return The servlet instance to which we are attached.
      */
     protected ActionServlet getServlet() {
 
@@ -140,7 +142,8 @@
      *
      * @param multipartRequestHandler The Handler to use for fileuploads.
      */
-    public void setMultipartRequestHandler(MultipartRequestHandler multipartRequestHandler) {
+    public void setMultipartRequestHandler(
+            MultipartRequestHandler multipartRequestHandler) {
 
         this.multipartRequestHandler = multipartRequestHandler;
 
@@ -171,26 +174,26 @@
 
 
     /**
-     * <p>Reset bean properties to their default state, as needed.  This method is
-     * called before the properties are repopulated by the controller.</p>
+     * <p>Reset bean properties to their default state, as needed.  This method
+     * is called before the properties are repopulated by the controller.</p>
      *
-     * <p>The default implementation does nothing. In practice, the only properties
-     * that need to be reset are those which represent checkboxes on a session-scoped
-     * form. Otherwise, properties can be given initial values where the field is
-     * declared. </p>
+     * <p>The default implementation does nothing. In practice, the only
+     * properties that need to be reset are those which represent checkboxes on
+     * a session-scoped form. Otherwise, properties can be given initial values
+     * where the field is declared. </p>
      *
      * <p>If the form is stored in session-scope so that values can be collected
      * over multiple requests (a "wizard"), you must be very careful of which
      * properties, if any, are reset. As mentioned, session-scope checkboxes
      * must be reset to false for any page where this property is set. This is
-     * because the client does not submit a checkbox value when it is clear (false).
-     * If a session-scoped checkbox is not proactively reset, it can never be set
-     * to false.</p>
-     *
-     * <p>This method is <strong>not</strong> the appropriate place to initialize
-     * form value for an "update" type page (this should be done in a setup Action).
-     * You mainly need to worry about setting checkbox values to false; most of the
-     * time you can leave this method unimplemented.
+     * because the client does not submit a checkbox value when it is clear
+     * (false). If a session-scoped checkbox is not proactively reset, it can
+     * never be set to false.</p>
+     *
+     * <p>This method is <strong>not</strong> the appropriate place to
+     * initialize form value for an "update" type page (this should be done in
+     * a setup Action). You mainly need to worry about setting checkbox values
+     * to false; most of the time you can leave this method unimplemented.
      * </p>
      *
      * @param mapping The mapping used to select this instance
@@ -198,7 +201,7 @@
      */
     public void reset(ActionMapping mapping, HttpServletRequest request) {
 
-        ;       // Default implementation does nothing
+        // Default implementation does nothing
 
     }
 
@@ -215,6 +218,8 @@
      *
      * @param mapping The mapping used to select this instance
      * @param request The servlet request we are processing
+     * @return The set of validation errors, if validation failed; an empty set
+     *         or <code>null</code> if validation succeeded.
      */
     public ActionErrors validate(ActionMapping mapping,
                                  ServletRequest request) {
@@ -243,6 +248,8 @@
      *
      * @param mapping The mapping used to select this instance
      * @param request The servlet request we are processing
+     * @return The set of validation errors, if validation failed; an empty set
+     *         or <code>null</code> if validation succeeded.
      */
     public ActionErrors validate(ActionMapping mapping,
                                  HttpServletRequest request) {

Modified: struts/core/trunk/src/share/org/apache/struts/action/ActionFormBean.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ActionFormBean.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ActionFormBean.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ActionFormBean.java Fri May 13 22:09:32 2005
@@ -29,7 +29,8 @@
  * configuration file. It can be subclassed as necessary to add additional
  * properties.</p>
  *
- * <p>Since Struts 1.1 <code>ActionFormBean</code> extends <code>FormBeanConfig</code>.</p>
+ * <p>Since Struts 1.1 <code>ActionFormBean</code> extends
+ * <code>FormBeanConfig</code>.</p>
  *
  * <p><strong>NOTE</strong> - This class would have been deprecated and
  * replaced by <code>org.apache.struts.config.FormBeanConfig</code> except

Modified: struts/core/trunk/src/share/org/apache/struts/action/ActionForward.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ActionForward.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ActionForward.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ActionForward.java Fri May 13 22:09:32 2005
@@ -163,13 +163,15 @@
 
 
     /**
-     * <p>Construct a new instance based on the values of another ActionForward.</p>
+     * <p>Construct a new instance based on the values of another
+     * ActionForward.</p>
      *
      * @param copyMe An ActionForward instance to copy
      * @since Struts 1.2.1
      */
     public ActionForward(ActionForward copyMe) {
-        this(copyMe.getName(),copyMe.getPath(),copyMe.getRedirect(),copyMe.getModule());
+        this(copyMe.getName(), copyMe.getPath(), copyMe.getRedirect(),
+                copyMe.getModule());
         setContextRelative(copyMe.getContextRelative());
     }
 

Modified: struts/core/trunk/src/share/org/apache/struts/action/ActionMapping.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ActionMapping.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ActionMapping.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ActionMapping.java Fri May 13 22:09:32 2005
@@ -29,10 +29,10 @@
 /**
  * <p>An <strong>ActionMapping</strong> represents the information that the
  * controller, <code>RequestProcessor</code>, knows about the mapping
- * of a particular request to an instance of a particular <code>Action</code> class.
- * The <code>ActionMapping</code> instance used to select a particular
- * <code>Action</code> is passed on to that <code>Action</code>, thereby providing
- * access to any custom configuration information included with the
+ * of a particular request to an instance of a particular <code>Action</code>
+ * class. The <code>ActionMapping</code> instance used to select a particular
+ * <code>Action</code> is passed on to that <code>Action</code>, thereby
+ * providing access to any custom configuration information included with the
  * <code>ActionMapping</code> object.</p>
  *
  * <p>Since Struts 1.1 this class extends <code>ActionConfig</code>.
@@ -57,6 +57,8 @@
      * can be found, return <code>null</code>.</p>
      *
      * @param name Logical name of the forwarding instance to be returned
+     *
+     * @return The local or global forward with the specified name.
      */
     public ActionForward findForward(String name) {
 
@@ -73,11 +75,13 @@
      * <p>Return the logical names of all locally defined forwards for this
      * mapping. If there are no such forwards, a zero-length array
      * is returned.</p>
+     *
+     * @return The forward names for this action mapping.
      */
     public String[] findForwards() {
 
         ArrayList results = new ArrayList();
-        ForwardConfig fcs[] = findForwardConfigs();
+        ForwardConfig[] fcs = findForwardConfigs();
         for (int i = 0; i < fcs.length; i++) {
             results.add(fcs[i].getName());
         }
@@ -89,6 +93,8 @@
     /**
      * <p>Create (if necessary) and return an {@link ActionForward} that
      * corresponds to the <code>input</code> property of this Action.</p>
+     *
+     * @return The input forward for this action mapping.
      *
      * @since Struts 1.1
      */

Modified: struts/core/trunk/src/share/org/apache/struts/action/ActionMessage.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ActionMessage.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ActionMessage.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ActionMessage.java Fri May 13 22:09:32 2005
@@ -53,7 +53,7 @@
      * @param value0 First replacement value
      */
     public ActionMessage(String key, Object value0) {
-        this(key, new Object[] { value0 });
+        this(key, new Object[] {value0});
     }
 
 
@@ -65,7 +65,7 @@
      * @param value1 Second replacement value
      */
     public ActionMessage(String key, Object value0, Object value1) {
-        this(key, new Object[] { value0, value1 });
+        this(key, new Object[] {value0, value1});
     }
 
 
@@ -80,7 +80,7 @@
     public ActionMessage(String key, Object value0, Object value1,
                        Object value2) {
 
-        this(key, new Object[] { value0, value1, value2 });
+        this(key, new Object[] {value0, value1, value2});
     }
 
 
@@ -96,7 +96,7 @@
     public ActionMessage(String key, Object value0, Object value1,
                        Object value2, Object value3) {
 
-        this(key, new Object[] { value0, value1, value2, value3 });
+        this(key, new Object[] {value0, value1, value2, value3});
     }
 
 
@@ -118,7 +118,8 @@
      * <p>Construct an action message with the specified replacement values.</p>
      *
      * @param key Message key for this message
-     * @param resource Indicates whether the key is a bundle key or literal value
+     * @param resource Indicates whether the key is a bundle key or literal
+     *                 value
      */
     public ActionMessage(String key, boolean resource) {
 
@@ -140,10 +141,11 @@
     /**
      * <p>The replacement values for this mesasge.</p>
      */
-    protected Object values[] = null;
+    protected Object[] values = null;
 
     /**
-     * <p>Indicates whether the key is taken to be as a  bundle key [true] or literal value [false].</p>
+     * <p>Indicates whether the key is taken to be as a  bundle key [true] or
+     * literal value [false].</p>
      */
     protected boolean resource = true;
 
@@ -153,6 +155,8 @@
 
     /**
      * <p>Get the message key for this message.</p>
+     *
+     * @return The message key for this message.
      */
     public String getKey() {
 
@@ -163,6 +167,8 @@
 
     /**
      * <p>Get the replacement values for this message.</p>
+     *
+     * @return The replacement values for this message.
      */
     public Object[] getValues() {
 
@@ -172,7 +178,11 @@
 
 
     /**
-     * <p>Indicate whether the key is taken to be as a  bundle key [true] or literal value [false].</p>
+     * <p>Indicate whether the key is taken to be as a  bundle key [true] or
+     * literal value [false].</p>
+     *
+     * @return <code>true</code> if the key is a bundle key; <code>false</code>
+     *         otherwise.
      */
     public boolean isResource() {
 

Modified: struts/core/trunk/src/share/org/apache/struts/action/ActionMessages.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ActionMessages.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ActionMessages.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ActionMessages.java Fri May 13 22:09:32 2005
@@ -110,8 +110,8 @@
 
 
     /**
-     * <p>Create an <code>ActionMessages</code> object initialized with the given
-     * messages.</p>
+     * <p>Create an <code>ActionMessages</code> object initialized with the
+     * given messages.</p>
      *
      * @param messages The messages to be initially added to this object.
      * This parameter can be <code>null</code>.
@@ -151,12 +151,12 @@
 
 
     /**
-     * <p>Adds the messages from the given <code>ActionMessages</code> object to
-     * this set of messages. The messages are added in the order they are returned from
-     * the <code>properties</code> method. If a message's property is already in the current
-     * <code>ActionMessages</code> object, it is added to the end of the list for that
-     * property. If a message's property is not in the current list it is added to the end
-     * of the properties.</p>
+     * <p>Adds the messages from the given <code>ActionMessages</code> object
+     * to this set of messages. The messages are added in the order they are
+     * returned from the <code>properties</code> method. If a message's property
+     * is already in the current <code>ActionMessages</code> object, it is added
+     * to the end of the list for that property. If a message's property is not
+     * in the current list it is added to the end of the properties.</p>
      *
      * @param messages The <code>ActionMessages</code> object to be added.
      * This parameter can be <code>null</code>.
@@ -197,6 +197,9 @@
      * <p>Return <code>true</code> if there are no messages recorded
      * in this collection, or <code>false</code> otherwise.</p>
      *
+     * @return <code>true</code> if there are no messages recorded in this
+     *         collection; <code>false</code> otherwise.
+     *
      * @since Struts 1.1
      */
     public boolean isEmpty() {
@@ -211,6 +214,8 @@
      * <p>Return the set of all recorded messages, without distinction
      * by which property the messages are associated with. If there are
      * no messages recorded, an empty enumeration is returned.</p>
+     *
+     * @return An iterator over the messages for all properties.
      */
     public Iterator get() {
 
@@ -234,7 +239,8 @@
         for (Iterator i = actionItems.iterator(); i.hasNext();) {
             ActionMessageItem ami = (ActionMessageItem) i.next();
 
-            for (Iterator messages = ami.getList().iterator(); messages.hasNext();) {
+            for (Iterator messages = ami.getList().iterator();
+                    messages.hasNext();) {
                 results.add(messages.next());
             }
         }
@@ -248,6 +254,7 @@
      * If there are no such messages, an empty enumeration is returned.</p>
      *
      * @param property Property name (or ActionMessages.GLOBAL_MESSAGE)
+     * @return An iterator over the messages for the specified property.
      */
     public Iterator get(String property) {
 
@@ -281,10 +288,12 @@
 
     /**
      * <p>Return the set of property names for which at least one message has
-     * been recorded. If there are no messages, an empty <code>Iterator</code> is returned.
-     * If you have recorded global messages, the <code>String</code> value of
-     * <code>ActionMessages.GLOBAL_MESSAGE</code> will be one of the returned
-     * property names.</p>
+     * been recorded. If there are no messages, an empty <code>Iterator</code>
+     * is returned. If you have recorded global messages, the
+     * <code>String</code> value of <code>ActionMessages.GLOBAL_MESSAGE</code>
+     * will be one of the returned property names.</p>
+     *
+     * @return An iterator over the property names for which messages exist.
      */
     public Iterator properties() {
 
@@ -318,6 +327,8 @@
      * global messages). <strong>NOTE</strong> - it is more efficient to call
      * <code>isEmpty</code> if all you care about is whether or not there are
      * any messages at all.</p>
+     *
+     * @return The number of messages associated with all properties.
      */
     public int size() {
 
@@ -334,9 +345,11 @@
 
 
     /**
-     * <p>Return the number of messages associated with the specified property.</p>
+     * <p>Return the number of messages associated with the specified property.
+     * </p>
      *
      * @param property Property name (or ActionMessages.GLOBAL_MESSAGE)
+     * @return The number of messages associated with the property.
      */
     public int size(String property) {
 

Modified: struts/core/trunk/src/share/org/apache/struts/action/ActionRedirect.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ActionRedirect.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ActionRedirect.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ActionRedirect.java Fri May 13 22:09:32 2005
@@ -19,7 +19,6 @@
 package org.apache.struts.action;
 
 import org.apache.struts.config.ForwardConfig;
-import org.apache.struts.action.ActionForward;
 import org.apache.struts.util.ResponseUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -183,9 +182,11 @@
 
         } else if (currentValue instanceof String[]) {
             // add the value to the list of existing values
-            List newValues = new ArrayList(Arrays.asList((Object[]) currentValue));
+            List newValues = new ArrayList(Arrays.asList(
+                    (Object[]) currentValue));
             newValues.add(value);
-            parameterValues.put(fieldName, (String[]) newValues.toArray(new String[newValues.size()]));
+            parameterValues.put(fieldName,
+                    (String[]) newValues.toArray(new String[newValues.size()]));
         }
     }
 
@@ -272,8 +273,9 @@
                     strParam.append(name)
                             .append("=")
                             .append(values[i]);
-                    if (i < values.length - 1)
+                    if (i < values.length - 1) {
                         strParam.append("&");
+                    }
                 }
             }
 

Modified: struts/core/trunk/src/share/org/apache/struts/action/ActionServlet.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ActionServlet.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ActionServlet.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ActionServlet.java Fri May 13 22:09:32 2005
@@ -93,22 +93,25 @@
  * <li>There can be <b>one</b> instance of this servlet class,
  *     which receives and processes all requests that change the state of
  *     a user's interaction with the application.  The servlet delegates the
- *     handling of a request to a {@link RequestProcessor} object. This component
- *     represents the "controller" component of an MVC architecture.</li>
- * <li>The <code>RequestProcessor</code> selects and invokes an {@link Action} class to perform
- *     the requested business logic, or delegates the response to another resource.</li>
- * <li>The <code>Action</code> classes can manipulate the state of the application's
- *     interaction with the user, typically by creating or modifying JavaBeans
- *     that are stored as request or session attributes (depending on how long
- *     they need to be available). Such JavaBeans represent the "model"
- *     component of an MVC architecture.</li>
+ *     handling of a request to a {@link RequestProcessor} object. This
+ *     component represents the "controller" component of an MVC architecture.
+ *     </li>
+ * <li>The <code>RequestProcessor</code> selects and invokes an {@link Action}
+ *     class to perform the requested business logic, or delegates the response
+ *     to another resource.</li>
+ * <li>The <code>Action</code> classes can manipulate the state of the
+ *     application's interaction with the user, typically by creating or
+ *     modifying JavaBeans that are stored as request or session attributes
+ *     (depending on how long they need to be available). Such JavaBeans
+ *     represent the "model" component of an MVC architecture.</li>
  * <li>Instead of producing the next page of the user interface directly,
- *     <code>Action</code> classes generally return an {@link ActionForward} to indicate
- *     which resource should handle the response. If the <code>Action</code>
- *     does not return null, the <code>RequestProcessor</code> forwards or
- *     redirects to the specified resource (by utilizing
- *     <code>RequestDispatcher.forward</code> or <code>Response.sendRedirect</code>)
- *     so as to produce the next page of the user interface.</li>
+ *     <code>Action</code> classes generally return an {@link ActionForward} to
+ *     indicate which resource should handle the response. If the
+ *     <code>Action</code> does not return null, the
+ *     <code>RequestProcessor</code> forwards or redirects to the specified
+ *     resource (by utilizing <code>RequestDispatcher.forward</code> or
+ *     <code>Response.sendRedirect</code>) so as to produce the next page of
+ *     the user interface.</li>
  * </ul>
  *
  * <p>The standard version of <code>RequestsProcessor</code> implements the
@@ -125,10 +128,10 @@
  *     instantiate an instance of that class and cache it for future use.</li>
  * <li>Optionally populate the properties of an <code>ActionForm</code> bean
  *     associated with this mapping.</li>
- * <li>Call the <code>execute</code> method of this <code>Action</code> class, passing
- *     on a reference to the mapping that was used, the relevant form-bean
- *     (if any), and the request and the response that were passed to the
- *     controller by the servlet container (thereby providing access to any
+ * <li>Call the <code>execute</code> method of this <code>Action</code> class,
+ *     passing on a reference to the mapping that was used, the relevant
+ *     form-bean (if any), and the request and the response that were passed to
+ *     the controller by the servlet container (thereby providing access to any
  *     specialized properties of the mapping itself as well as to the
  *     ServletContext).
  *     </li>
@@ -154,10 +157,10 @@
  *     <code>ModuleConfig</code> interface.
  *     [org.apache.struts.config.impl.DefaultModuleConfigFactory]
  * </li>
- * <li><strong>convertNull</strong> - Force simulation of the Struts 1.0 behavior
- *     when populating forms. If set to true, the numeric Java wrapper class types
- *     (like <code>java.lang.Integer</code>) will default to null (rather than 0).
- *     (Since Struts 1.1) [false] </li>
+ * <li><strong>convertNull</strong> - Force simulation of the Struts 1.0
+ *     behavior when populating forms. If set to true, the numeric Java wrapper
+ *     class types (like <code>java.lang.Integer</code>) will default to null
+ *     (rather than 0). (Since Struts 1.1) [false] </li>
  * <li><strong>rulesets</strong> - Comma-delimited list of fully qualified
  *     classnames of additional <code>org.apache.commons.digester.RuleSet</code>
  *     instances that should be added to the <code>Digester</code> that will
@@ -296,12 +299,13 @@
             ; // Servlet container doesn't have the latest version
             ; // of commons-logging-api.jar installed
 
-            // :FIXME: Why is this dependent on the container's version of commons-logging?
-            // Shouldn't this depend on the version packaged with Struts?
+            // :FIXME: Why is this dependent on the container's version of
+            // commons-logging? Shouldn't this depend on the version packaged
+            // with Struts?
             /*
               Reason: LogFactory.release(classLoader); was added as
-              an attempt to investigate the OutOfMemory error reported on Bugzilla #14042.
-              It was committed for version 1.136 by craigmcc
+              an attempt to investigate the OutOfMemory error reported on
+              Bugzilla #14042. It was committed for version 1.136 by craigmcc
             */
         }
 
@@ -312,9 +316,9 @@
 
 
     /**
-     * <p>Initialize this servlet.  Most of the processing has been factored into
-     * support methods so that you can override particular functionality at a
-     * fairly granular level.</p>
+     * <p>Initialize this servlet.  Most of the processing has been factored
+     * into support methods so that you can override particular functionality
+     * at a fairly granular level.</p>
      *
      * @exception ServletException if we cannot configure ourselves correctly
      */
@@ -401,7 +405,8 @@
             }
         }
 
-        String[] prefixes = (String[]) prefixList.toArray(new String[prefixList.size()]);
+        String[] prefixes = (String[]) prefixList.toArray(
+                new String[prefixList.size()]);
         context.setAttribute(Globals.MODULE_PREFIXES_KEY, prefixes);
     }
 
@@ -534,7 +539,8 @@
 
 
     /**
-     * <p>Gracefully release any configDigester instance that we have created.</p>
+     * <p>Gracefully release any configDigester instance that we have created.
+     * </p>
      *
      * @since Struts 1.1
      */
@@ -586,7 +592,8 @@
      *  instance
      * @since Struts 1.1
      */
-    protected synchronized RequestProcessor getRequestProcessor(ModuleConfig config)
+    protected synchronized RequestProcessor getRequestProcessor(
+            ModuleConfig config)
         throws ServletException {
 
         // :FIXME: Document UnavailableException?
@@ -620,8 +627,8 @@
 
 
     /**
-     * <p>Returns the RequestProcessor for the given module or null if one does not
-     * exist.  This method will not create a RequestProcessor.</p>
+     * <p>Returns the RequestProcessor for the given module or null if one does
+     * not exist.  This method will not create a RequestProcessor.</p>
      *
      * @param config The ModuleConfig.
      */
@@ -636,7 +643,8 @@
      * @since Struts 1.2
      */
     protected void initModuleConfigFactory() {
-        String configFactory = getServletConfig().getInitParameter("configFactory");
+        String configFactory = getServletConfig().getInitParameter(
+                "configFactory");
         if (configFactory != null) {
             ModuleConfigFactory.setFactoryClass(configFactory);
         }
@@ -657,7 +665,8 @@
     protected ModuleConfig initModuleConfig(String prefix, String paths)
         throws ServletException {
 
-        // :FIXME: Document UnavailableException? (Doesn't actually throw anything)
+        // :FIXME: Document UnavailableException? (Doesn't actually throw
+        // anything)
 
         if (log.isDebugEnabled()) {
             log.debug(
@@ -757,8 +766,8 @@
 
 
     /**
-     * <p>Simplifies exception handling in the <code>parseModuleConfigFile</code> method.<p>
-     * @param path
+     * <p>Simplifies exception handling in the
+     * <code>parseModuleConfigFile</code> method.<p> @param path
      * @param e
      * @throws UnavailableException as a wrapper around Exception
      */
@@ -847,18 +856,21 @@
         (ModuleConfig config) throws ServletException {
 
         if (log.isDebugEnabled()) {
-            log.debug("Initializing module path '" + config.getPrefix() + "' plug ins");
+            log.debug("Initializing module path '" + config.getPrefix()
+                    + "' plug ins");
         }
 
         PlugInConfig plugInConfigs[] = config.findPlugInConfigs();
         PlugIn plugIns[] = new PlugIn[plugInConfigs.length];
 
-        getServletContext().setAttribute(Globals.PLUG_INS_KEY + config.getPrefix(), plugIns);
+        getServletContext().setAttribute(
+                Globals.PLUG_INS_KEY + config.getPrefix(), plugIns);
         for (int i = 0; i < plugIns.length; i++) {
             try {
-                plugIns[i] =
-                    (PlugIn)RequestUtils.applicationInstance(plugInConfigs[i].getClassName());
-                 BeanUtils.populate(plugIns[i], plugInConfigs[i].getProperties());
+                plugIns[i] = (PlugIn) RequestUtils.applicationInstance(
+                        plugInConfigs[i].getClassName());
+                BeanUtils.populate(plugIns[i],
+                        plugInConfigs[i].getProperties());
                   // Pass the current plugIn config object to the PlugIn.
                   // The property is set only if the plugin declares it.
                   // This plugin config object is needed by Tiles
@@ -868,15 +880,17 @@
                         "currentPlugInConfigObject",
                         plugInConfigs[i]);
                 } catch (Exception e) {
-                  // FIXME Whenever we fail silently, we must document a valid reason
-                  // for doing so.  Why should we fail silently if a property can't be set on
-                  // the plugin?
+                  // FIXME Whenever we fail silently, we must document a valid
+                  // reason for doing so.  Why should we fail silently if a
+                  // property can't be set on the plugin?
                     /**
                      * Between version 1.138-1.140 cedric made these changes.
-                     * The exceptions are caught to deal with containers applying strict security.
-                     * This was in response to bug #15736
+                     * The exceptions are caught to deal with containers
+                     * applying strict security. This was in response to bug
+                     * #15736
                      *
-                     * Recommend that we make the currentPlugInConfigObject part of the PlugIn Interface if we can, Rob
+                     * Recommend that we make the currentPlugInConfigObject part
+                     * of the PlugIn Interface if we can, Rob
                      */
                 }
                 plugIns[i].init(this, config);
@@ -968,7 +982,8 @@
                             + beanConfig.getName() + "'");
                 }
 
-                beanConfig = processFormBeanConfigClass(beanConfig, moduleConfig);
+                beanConfig = processFormBeanConfigClass(beanConfig,
+                        moduleConfig);
 
                 beanConfig.processExtends(moduleConfig);
             }
@@ -1337,7 +1352,8 @@
         for (int i = 0; i < actionConfigs.length; i++) {
             ActionConfig actionConfig = actionConfigs[i];
 
-            // Verify that required fields are all present for the forward configs
+            // Verify that required fields are all present for the forward
+            // configs
             ForwardConfig[] forwards = actionConfig.findForwardConfigs();
             for (int j = 0; j < forwards.length; j++) {
                 ForwardConfig forward = forwards[j];
@@ -1473,8 +1489,8 @@
 
 
     /**
-     * <p>Initialize the application <code>MessageResources</code> for the specified
-     * module.</p>
+     * <p>Initialize the application <code>MessageResources</code> for the
+     * specified module.</p>
      *
      * @param config ModuleConfig information for this module
      *
@@ -1518,9 +1534,9 @@
     /**
      * <p>Create (if needed) and return a new <code>Digester</code>
      * instance that has been initialized to process Struts module
-     * configuration files and configure a corresponding <code>ModuleConfig</code>
-     * object (which must be pushed on to the evaluation stack before parsing
-     * begins).</p>
+     * configuration files and configure a corresponding
+     * <code>ModuleConfig</code> object (which must be pushed on to the
+     * evaluation stack before parsing begins).</p>
      *
      * @exception ServletException if a Digester cannot be configured
      * @since Struts 1.1
@@ -1581,11 +1597,13 @@
             }
 
             if (log.isDebugEnabled()) {
-                log.debug("Configuring custom Digester Ruleset of type " + ruleset);
+                log.debug("Configuring custom Digester Ruleset of type "
+                        + ruleset);
             }
 
             try {
-                RuleSet instance = (RuleSet) RequestUtils.applicationInstance(ruleset);
+                RuleSet instance =
+                        (RuleSet) RequestUtils.applicationInstance(ruleset);
                 this.configDigester.addRuleSet(instance);
             } catch (Exception e) {
                 log.error("Exception configuring custom Digester RuleSet", e);
@@ -1596,7 +1614,8 @@
 
 
     /**
-     * <p>Check the status of the <code>validating</code> initialization parameter.</p>
+     * <p>Check the status of the <code>validating</code> initialization
+     * parameter.</p>
      *
      * @return true if the module Digester should validate.
      */
@@ -1630,8 +1649,8 @@
         try {
             internal = MessageResources.getMessageResources(internalName);
         } catch (MissingResourceException e) {
-            log.error("Cannot load internal resources from '" + internalName + "'",
-                e);
+            log.error("Cannot load internal resources from '"
+                    + internalName + "'", e);
             throw new UnavailableException
                 ("Cannot load internal resources from '" + internalName + "'");
         }
@@ -1699,11 +1718,14 @@
 
         if (convertNull) {
             ConvertUtils.deregister();
-            ConvertUtils.register(new BigDecimalConverter(null), BigDecimal.class);
-            ConvertUtils.register(new BigIntegerConverter(null), BigInteger.class);
+            ConvertUtils.register(
+                    new BigDecimalConverter(null), BigDecimal.class);
+            ConvertUtils.register(
+                    new BigIntegerConverter(null), BigInteger.class);
             ConvertUtils.register(new BooleanConverter(null), Boolean.class);
             ConvertUtils.register(new ByteConverter(null), Byte.class);
-            ConvertUtils.register(new CharacterConverter(null), Character.class);
+            ConvertUtils.register(
+                    new CharacterConverter(null), Character.class);
             ConvertUtils.register(new DoubleConverter(null), Double.class);
             ConvertUtils.register(new FloatConverter(null), Float.class);
             ConvertUtils.register(new IntegerConverter(null), Integer.class);
@@ -1786,7 +1808,8 @@
         }
 
         if (servletMapping != null) {
-            getServletContext().setAttribute(Globals.SERVLET_KEY, servletMapping);
+            getServletContext().setAttribute(Globals.SERVLET_KEY,
+                    servletMapping);
         }
 
     }
@@ -1870,7 +1893,8 @@
      * @exception IOException if an input/output error occurs
      * @exception ServletException if a servlet exception is thrown
      */
-    protected void process(HttpServletRequest request, HttpServletResponse response)
+    protected void process(HttpServletRequest request,
+            HttpServletResponse response)
         throws IOException, ServletException {
 
         ModuleUtils.getInstance().selectModule(request, getServletContext());

Modified: struts/core/trunk/src/share/org/apache/struts/action/DynaActionForm.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/DynaActionForm.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/DynaActionForm.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/DynaActionForm.java Fri May 13 22:09:32 2005
@@ -97,7 +97,7 @@
 
     public void initialize(FormBeanConfig config) {
 
-        FormPropertyConfig props[] = config.findFormPropertyConfigs();
+        FormPropertyConfig[] props = config.findFormPropertyConfigs();
         for (int i = 0; i < props.length; i++) {
             set(props[i].getName(), props[i].initial());
         }
@@ -120,13 +120,13 @@
      * @param request The servlet request we are processing
      */
     public void reset(ActionMapping mapping, ServletRequest request) {
-        super.reset(mapping,request);
+        super.reset(mapping, request);
     }
 
 
     /**
-     * <p>Reset bean properties to their default state, as needed.  This method is
-     * called before the properties are repopulated by the controller.</p>
+     * <p>Reset bean properties to their default state, as needed.  This method
+     * is called before the properties are repopulated by the controller.</p>
      *
      * <p>The default implementation (since Struts 1.1) does nothing.
      * Subclasses may override this method to reset bean properties to
@@ -139,7 +139,7 @@
      * @param request The servlet request we are processing
      */
     public void reset(ActionMapping mapping, HttpServletRequest request) {
-        super.reset(mapping,request);
+        super.reset(mapping, request);
     }
 
 
@@ -419,11 +419,10 @@
                     ("Primitive value for '" + name + "'");
             }
         } else if (!isDynaAssignable(descriptor.getType(), value.getClass())) {
-            throw new ConversionException
-                ("Cannot assign value of type '" +
-                 value.getClass().getName() +
-                 "' to property '" + name + "' of type '" +
-                 descriptor.getType().getName() + "'");
+            throw new ConversionException("Cannot assign value of type '"
+                 + value.getClass().getName()
+                 + "' to property '" + name + "' of type '"
+                 + descriptor.getType().getName() + "'");
         }
         dynaValues.put(name, value);
 
@@ -618,14 +617,14 @@
     protected boolean isDynaAssignable(Class dest, Class source) {
 
         if (dest.isAssignableFrom(source) ||
-            ((dest == Boolean.TYPE) && (source == Boolean.class)) ||
-            ((dest == Byte.TYPE) && (source == Byte.class)) ||
-            ((dest == Character.TYPE) && (source == Character.class)) ||
-            ((dest == Double.TYPE) && (source == Double.class)) ||
-            ((dest == Float.TYPE) && (source == Float.class)) ||
-            ((dest == Integer.TYPE) && (source == Integer.class)) ||
-            ((dest == Long.TYPE) && (source == Long.class)) ||
-            ((dest == Short.TYPE) && (source == Short.class))) {
+            ((dest == Boolean.TYPE) && (source == Boolean.class))
+                || ((dest == Byte.TYPE) && (source == Byte.class))
+                || ((dest == Character.TYPE) && (source == Character.class))
+                || ((dest == Double.TYPE) && (source == Double.class))
+                || ((dest == Float.TYPE) && (source == Float.class))
+                || ((dest == Integer.TYPE) && (source == Integer.class))
+                || ((dest == Long.TYPE) && (source == Long.class))
+                ||((dest == Short.TYPE) && (source == Short.class))) {
             return (true);
         } else {
             return (false);

Modified: struts/core/trunk/src/share/org/apache/struts/action/DynaActionFormClass.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/DynaActionFormClass.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/DynaActionFormClass.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/DynaActionFormClass.java Fri May 13 22:09:32 2005
@@ -94,7 +94,7 @@
     /**
      * <p>The set of dynamic properties that are part of this DynaClass.</p>
      */
-    protected DynaProperty properties[] = null;
+    protected DynaProperty[] properties = null;
 
 
     /**
@@ -111,7 +111,7 @@
 
     /**
      * <p>Return the name of this <code>DynaClass</code> (analogous to the
-     * <code>getName()</code> method of <code>java.lang.Class</code), which
+     * <code>getName()</code> method of <code>java.lang.Class</code>, which
      * allows the same <code>DynaClass</code> implementation class to support
      * different dynamic classes, with different sets of properties.
      */
@@ -176,7 +176,7 @@
         DynaActionForm dynaBean =
             (DynaActionForm) getBeanClass().newInstance();
         dynaBean.setDynaActionFormClass(this);
-        FormPropertyConfig props[] = config.findFormPropertyConfigs();
+        FormPropertyConfig[] props = config.findFormPropertyConfigs();
         for (int i = 0; i < props.length; i++) {
             dynaBean.set(props[i].getName(), props[i].initial());
         }
@@ -195,7 +195,7 @@
 
         StringBuffer sb = new StringBuffer("DynaActionFormBean[name=");
         sb.append(name);
-        DynaProperty props[] = getDynaProperties();
+        DynaProperty[] props = getDynaProperties();
         if (props == null) {
             props = new DynaProperty[0];
         }
@@ -215,7 +215,8 @@
 
 
     /**
-     * @deprecated No longer need to Clear our cache of <code>DynaActionFormClass</code> instances.
+     * @deprecated No longer need to Clear our cache of
+     * <code>DynaActionFormClass</code> instances.
      */
     public static void clear() {
         ; // do nothing
@@ -223,8 +224,8 @@
 
 
     /**
-     * Return the <code>DynaActionFormClass</code> instance for the specified form bean
-     * configuration instance.
+     * Return the <code>DynaActionFormClass</code> instance for the specified
+     * form bean configuration instance.
      */
     public static DynaActionFormClass
         createDynaActionFormClass(FormBeanConfig config) {
@@ -272,21 +273,21 @@
         try {
             beanClass = RequestUtils.applicationClass(config.getType());
         } catch (Throwable t) {
-            throw new IllegalArgumentException
-                ("Cannot instantiate ActionFormBean class '" +
-                 config.getType() + "': " + t);
+            throw new IllegalArgumentException(
+                    "Cannot instantiate ActionFormBean class '"
+                    + config.getType() + "': " + t);
         }
         if (!DynaActionForm.class.isAssignableFrom(beanClass)) {
-            throw new IllegalArgumentException
-                ("Class '" + config.getType() + "' is not a subclass of " +
-                 "'org.apache.struts.action.DynaActionForm'");
+            throw new IllegalArgumentException(
+                    "Class '" + config.getType() + "' is not a subclass of "
+                    + "'org.apache.struts.action.DynaActionForm'");
         }
 
         // Set the name we will know ourselves by from the form bean name
         this.name = config.getName();
 
         // Look up the property descriptors for this bean class
-        FormPropertyConfig descriptors[] = config.findFormPropertyConfigs();
+        FormPropertyConfig[] descriptors = config.findFormPropertyConfigs();
         if (descriptors == null) {
             descriptors = new FormPropertyConfig[0];
         }

Modified: struts/core/trunk/src/share/org/apache/struts/action/ExceptionHandler.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ExceptionHandler.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ExceptionHandler.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ExceptionHandler.java Fri May 13 22:09:32 2005
@@ -123,20 +123,22 @@
 
 
     /**
-     * <p>Default implementation for handling an <code>ActionError</code> generated
-     * from an <code>Exception</code> during <code>Action</code> delegation. The default
-     * implementation is to set an attribute of the request or session, as
-     * defined by the scope provided (the scope from the exception mapping). An
-     * <code>ActionErrors</code> instance is created, the error is added to the collection
-     * and the collection is set under the <code>Globals.ERROR_KEY</code>.</p>
+     * <p>Default implementation for handling an <code>ActionError</code>
+     * generated from an <code>Exception</code> during <code>Action</code>
+     * delegation. The default implementation is to set an attribute of the
+     * request or session, as defined by the scope provided (the scope from
+     * the exception mapping). An <code>ActionErrors</code> instance is created,
+     * the error is added to the collection and the collection is set under the
+     * <code>Globals.ERROR_KEY</code>.</p>
      *
      * @param request The request we are handling
      * @param property The property name to use for this error
      * @param error The error generated from the exception mapping
-     * @param forward The forward generated from the input path (from the form or exception mapping)
+     * @param forward The forward generated from the input path (from the form
+     *                or exception mapping)
      * @param scope The scope of the exception mapping.
-     * @deprecated Use storeException(HttpServletRequest, String, ActionMessage, ActionForward, String)
-     * instead. This will be removed after Struts 1.2.
+     * @deprecated Use storeException(HttpServletRequest, String, ActionMessage,
+     * ActionForward, String) instead. This will be removed after Struts 1.2.
      */
     protected void storeException(
         HttpServletRequest request,
@@ -145,24 +147,27 @@
         ActionForward forward,
         String scope) {
 
-        this.storeException(request, property, (ActionMessage) error, forward, scope);
+        this.storeException(request, property, (ActionMessage) error, forward,
+                scope);
         // :TODO: Remove after Struts 1.2
 
     }
 
 
     /**
-     * <p>Default implementation for handling an <code>ActionMessage</code> generated
-     * from an <code>Exception</code> during <code>Action</code> delegation. The default
-     * implementation is to set an attribute of the request or session, as
-     * defined by the scope provided (the scope from the exception mapping). An
-     * <code>ActionMessages</code> instance is created, the error is added to the
-     * collection and the collection is set under the <code>Globals.ERROR_KEY</code>.</p>
+     * <p>Default implementation for handling an <code>ActionMessage</code>
+     * generated from an <code>Exception</code> during <code>Action</code>
+     * delegation. The default implementation is to set an attribute of the
+     * request or session, as defined by the scope provided (the scope from the
+     * exception mapping). An <code>ActionMessages</code> instance is created,
+     * the error is added to the collection and the collection is set under the
+     * <code>Globals.ERROR_KEY</code>.</p>
      *
      * @param request The request we are handling
      * @param property The property name to use for this error
      * @param error The error generated from the exception mapping
-     * @param forward The forward generated from the input path (from the form or exception mapping)
+     * @param forward The forward generated from the input path (from the form
+     *                or exception mapping)
      * @param scope The scope of the exception mapping.
      * @since Struts 1.2
      */

Modified: struts/core/trunk/src/share/org/apache/struts/action/PlugIn.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/PlugIn.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/PlugIn.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/PlugIn.java Fri May 13 22:09:32 2005
@@ -29,17 +29,18 @@
  * module-specific resource or service that needs to be notified about
  * application startup and application shutdown events (corresponding to when
  * the container calls <code>init</code> and <code>destroy</code> on the
- * corresponding {@link ActionServlet} instance). <code>PlugIn</code> objects can be
- * configured in the <code>struts-config.xml</code> file, without the need
- * to subclass {@link ActionServlet} simply to perform application lifecycle
- * activities.</p>
+ * corresponding {@link ActionServlet} instance). <code>PlugIn</code> objects
+ * can be configured in the <code>struts-config.xml</code> file, without the
+ * need to subclass {@link ActionServlet} simply to perform application
+ * lifecycle activities.</p>
  *
  * <p>Implementations of this interface must supply a zero-argument constructor
  * for use by {@link ActionServlet}. Configuration can be accomplished by
  * providing standard JavaBeans property setter methods, which will all have
  * been called before the <code>init()</code> method is invoked.</p>
  *
- * <p>This interface can be applied to any class, including an Action subclass</p>
+ * <p>This interface can be applied to any class, including an Action subclass.
+ * </p>
  *
  * @version $Rev$ $Date$
  * @since Struts 1.1

Modified: struts/core/trunk/src/share/org/apache/struts/action/RequestProcessor.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/RequestProcessor.java?rev=170121&r1=170120&r2=170121&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/RequestProcessor.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/RequestProcessor.java Fri May 13 22:09:32 2005
@@ -66,8 +66,9 @@
 
 
     /**
-     * <p>The request attribute under which the servlet path information is stored
-     * for processing during a <code>RequestDispatcher.include</code> call.</p>
+     * <p>The request attribute under which the servlet path information is
+     * stored for processing during a <code>RequestDispatcher.include</code>
+     * call.</p>
      */
     public static final String INCLUDE_SERVLET_PATH =
         "javax.servlet.include.servlet_path";
@@ -168,8 +169,8 @@
         }
 
         if (log.isDebugEnabled()) {
-            log.debug("Processing a '" + request.getMethod() +
-                      "' for path '" + path + "'");
+            log.debug("Processing a '" + request.getMethod()
+                    + "' for path '" + path + "'");
         }
 
         // Select a Locale for the current user if requested
@@ -286,7 +287,8 @@
 
                 response.sendError(
                     HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
-                    getInternal().getMessage("actionCreate", mapping.getPath()));
+                    getInternal().getMessage("actionCreate",
+                            mapping.getPath()));
 
                 return (null);
             }
@@ -323,9 +325,9 @@
 
         // Store the new instance in the appropriate scope
         if (log.isDebugEnabled()) {
-            log.debug(" Storing ActionForm bean instance in scope '" +
-                mapping.getScope() + "' under attribute key '" +
-                mapping.getAttribute() + "'");
+            log.debug(" Storing ActionForm bean instance in scope '"
+                    + mapping.getScope() + "' under attribute key '"
+                    + mapping.getAttribute() + "'");
         }
         if ("request".equals(mapping.getScope())) {
             request.setAttribute(mapping.getAttribute(), instance);
@@ -366,10 +368,11 @@
         String forwardPath = forward.getPath();
         String uri = null;
 
-        // paths not starting with / should be passed through without any processing
-        // (ie. they're absolute)
+        // paths not starting with / should be passed through without any
+        // processing (ie. they're absolute)
         if (forwardPath.startsWith("/")) {
-            uri = RequestUtils.forwardURL(request, forward, null);    // get module relative uri
+            // get module relative uri
+            uri = RequestUtils.forwardURL(request, forward, null);
         } else {
             uri = forwardPath;
         }
@@ -388,8 +391,9 @@
     }
 
 
-    // :FIXME: if Action.execute throws Exception, and Action.process has been removed,
-    // should the process* methods still throw IOException, ServletException?
+    // :FIXME: if Action.execute throws Exception, and Action.process has been
+    // removed, should the process* methods still throw IOException,
+    // ServletException?
 
     /**
      * <P>Ask the specified <code>Action</code> instance to handle this
@@ -480,7 +484,8 @@
     protected void processContent(HttpServletRequest request,
                                   HttpServletResponse response) {
 
-        String contentType = moduleConfig.getControllerConfig().getContentType();
+        String contentType =
+                moduleConfig.getControllerConfig().getContentType();
         if (contentType != null) {
             response.setContentType(contentType);
         }
@@ -589,9 +594,9 @@
 
 
     /**
-     * <p>Automatically select a <code>Locale</code> for the current user, if requested.
-     * <strong>NOTE</strong> - configuring Locale selection will trigger
-     * the creation of a new <code>HttpSession</code> if necessary.</p>
+     * <p>Automatically select a <code>Locale</code> for the current user, if
+     * requested. <strong>NOTE</strong> - configuring Locale selection will
+     * trigger the creation of a new <code>HttpSession</code> if necessary.</p>
      *
      * @param request The servlet request we are processing
      * @param response The servlet response we are creating
@@ -623,9 +628,9 @@
 
 
     /**
-     * <p>Select the mapping used to process the selection path for this request.
-     * If no mapping can be identified, create an error response and return
-     * <code>null</code>.</p>
+     * <p>Select the mapping used to process the selection path for this
+     * request. If no mapping can be identified, create an error response and
+     * return <code>null</code>.</p>
      *
      * @param request The servlet request we are processing
      * @param response The servlet response we are creating
@@ -649,7 +654,7 @@
         }
 
         // Locate the mapping for unknown paths (if any)
-        ActionConfig configs[] = moduleConfig.findActionConfigs();
+        ActionConfig[] configs = moduleConfig.findActionConfigs();
         for (int i = 0; i < configs.length; i++) {
             if (configs[i].getUnknown()) {
                 mapping = (ActionMapping) configs[i];
@@ -713,9 +718,9 @@
 
     /**
      * <p>Identify and return the path component (from the request URI) that
-     * we will use to select an <code>ActionMapping</code> with which to dispatch.
-     * If no such path can be identified, create an error response and return
-     * <code>null</code>.</p>
+     * we will use to select an <code>ActionMapping</code> with which to
+     * dispatch. If no such path can be identified, create an error response
+     * and return <code>null</code>.</p>
      *
      * @param request The servlet request we are processing
      * @param response The servlet response we are creating
@@ -744,8 +749,8 @@
         }
         String prefix = moduleConfig.getPrefix();
         if (!path.startsWith(prefix)) {
-            String msg =
-                getInternal().getMessage("processPath", request.getRequestURI());
+            String msg = getInternal().getMessage(
+                    "processPath", request.getRequestURI());
 
             log.error(msg);
             response.sendError(HttpServletResponse.SC_BAD_REQUEST, msg);
@@ -765,10 +770,10 @@
 
 
     /**
-     * <p>Populate the properties of the specified <code>ActionForm</code> instance from
-     * the request parameters included with this request.  In addition,
-     * request attribute <code>Globals.CANCEL_KEY</code> will be set if
-     * the request was submitted with a button created by
+     * <p>Populate the properties of the specified <code>ActionForm</code>
+     * instance from the request parameters included with this request.  In
+     * addition, request attribute <code>Globals.CANCEL_KEY</code> will be set
+     * if the request was submitted with a button created by
      * <code>CancelTag</code>.</p>
      *
      * @param request The servlet request we are processing
@@ -805,8 +810,8 @@
                               request);
 
         // Set the cancellation request attribute if appropriate
-        if ((request.getParameter(Globals.CANCEL_PROPERTY) != null) ||
-            (request.getParameter(Globals.CANCEL_PROPERTY_X) != null)) {
+        if ((request.getParameter(Globals.CANCEL_PROPERTY) != null)
+                || (request.getParameter(Globals.CANCEL_PROPERTY_X) != null)) {
 
             request.setAttribute(Globals.CANCEL_KEY, Boolean.TRUE);
         }
@@ -859,8 +864,8 @@
         for (int i = 0; i < roles.length; i++) {
             if (request.isUserInRole(roles[i])) {
                 if (log.isDebugEnabled()) {
-                    log.debug(" User '" + request.getRemoteUser() +
-                        "' has role '" + roles[i] + "', granting access");
+                    log.debug(" User '" + request.getRemoteUser()
+                            + "' has role '" + roles[i] + "', granting access");
                 }
                 return (true);
             }
@@ -868,8 +873,8 @@
 
         // The current user is not authorized for this action
         if (log.isDebugEnabled()) {
-            log.debug(" User '" + request.getRemoteUser() +
-                      "' does not have any required role, denying access");
+            log.debug(" User '" + request.getRemoteUser()
+                    + "' does not have any required role, denying access");
         }
 
         response.sendError(
@@ -971,11 +976,11 @@
 
 
     /**
-     * <p>Do a module relative forward to specified URI using request dispatcher.
-     * URI is relative to the current module. The real URI is compute by prefixing
-     * the module name.</p>
-     * <p>This method is used internally and is not part of the public API. It is
-     * advised to not use it in subclasses. </p>
+     * <p>Do a module relative forward to specified URI using request
+     * dispatcher. URI is relative to the current module. The real URI is
+     * compute by prefixing the module name.</p>
+     * <p>This method is used internally and is not part of the public API.
+     * It is advised to not use it in subclasses. </p>
      *
      * @param uri Module-relative URI to forward to
      * @param request Current page request
@@ -1109,8 +1114,8 @@
 
 
     /**
-     * <p>Return the <code>ServletContext</code> for the web application in which
-     * we are running.
+     * <p>Return the <code>ServletContext</code> for the web application in
+     * which we are running.
      */
     protected ServletContext getServletContext() {
 
@@ -1124,8 +1129,8 @@
      * web application.</p>
      *
      * @param message The message to be logged
-     * @deprecated Use commons-logging instead. This will be removed in a release
-     * after Struts 1.2.
+     * @deprecated Use commons-logging instead. This will be removed in a
+     * release after Struts 1.2.
      */
     protected void log(String message) {
         // :TODO: Remove after Struts 1.2
@@ -1142,8 +1147,8 @@
      * @param message The message to be logged
      * @param exception The exception to be logged
 
-     * @deprecated Use commons-logging instead.  This will be removed in a release
-     * after Struts 1.2.
+     * @deprecated Use commons-logging instead.  This will be removed in a
+     * release after Struts 1.2.
      */
     protected void log(String message, Throwable exception) {
         // :TODO: Remove after Sruts 1.2



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