This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 513da9085a12b8c51764033f80249b99d736ed9a
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri May 3 08:11:25 2024 +0100

    Code clean-up - formatting. No functional change.
---
 .../apache/catalina/ant/AbstractCatalinaTask.java  | 58 ++++++-------
 .../catalina/ant/BaseRedirectorHelperTask.java     | 89 ++++++++------------
 java/org/apache/catalina/ant/DeployTask.java       | 12 ++-
 java/org/apache/catalina/ant/FindLeaksTask.java    | 12 +--
 .../apache/catalina/ant/JKStatusUpdateTask.java    | 96 ++++++++--------------
 java/org/apache/catalina/ant/JMXGetTask.java       | 25 +++---
 java/org/apache/catalina/ant/JMXQueryTask.java     | 19 +++--
 java/org/apache/catalina/ant/JMXSetTask.java       | 35 ++++----
 java/org/apache/catalina/ant/ListTask.java         |  4 +-
 java/org/apache/catalina/ant/ReloadTask.java       |  5 +-
 java/org/apache/catalina/ant/ResourcesTask.java    | 10 +--
 java/org/apache/catalina/ant/ServerinfoTask.java   |  3 +-
 java/org/apache/catalina/ant/SessionsTask.java     |  3 +-
 .../catalina/ant/SslConnectorCiphersTask.java      |  4 +-
 java/org/apache/catalina/ant/StartTask.java        |  4 +-
 java/org/apache/catalina/ant/StopTask.java         |  4 +-
 java/org/apache/catalina/ant/ThreaddumpTask.java   |  4 +-
 java/org/apache/catalina/ant/UndeployTask.java     |  4 +-
 java/org/apache/catalina/ant/ValidatorTask.java    |  9 +-
 java/org/apache/catalina/ant/VminfoTask.java       |  4 +-
 20 files changed, 167 insertions(+), 237 deletions(-)

diff --git a/java/org/apache/catalina/ant/AbstractCatalinaTask.java 
b/java/org/apache/catalina/ant/AbstractCatalinaTask.java
index 61ac76e5e5..02a0d2bdc2 100644
--- a/java/org/apache/catalina/ant/AbstractCatalinaTask.java
+++ b/java/org/apache/catalina/ant/AbstractCatalinaTask.java
@@ -32,11 +32,11 @@ import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 
 /**
- * Abstract base class for Ant tasks that interact with the <em>Manager</em> 
web
- * application for dynamically deploying and undeploying applications. These
- * tasks require Ant 1.4 or later.
+ * Abstract base class for Ant tasks that interact with the <em>Manager</em> 
web application for dynamically deploying
+ * and undeploying applications. These tasks require Ant 1.4 or later.
  *
  * @author Craig R. McClanahan
+ *
  * @since 4.1
  */
 public abstract class AbstractCatalinaTask extends BaseRedirectorHelperTask {
@@ -107,16 +107,14 @@ public abstract class AbstractCatalinaTask extends 
BaseRedirectorHelperTask {
     }
 
     /**
-     * If set to true - ignore the constraint of the first line of the response
-     * message that must be "OK -".
+     * If set to true - ignore the constraint of the first line of the 
response message that must be "OK -".
      * <p>
-     * When this attribute is set to {@code false} (the default), the first 
line
-     * of server response is expected to start with "OK -". If it does not then
-     * the task is considered as failed and the first line is treated as an
-     * error message.
+     * When this attribute is set to {@code false} (the default), the first 
line of server response is expected to start
+     * with "OK -". If it does not then the task is considered as failed and 
the first line is treated as an error
+     * message.
      * <p>
-     * When this attribute is set to {@code true}, the first line of the
-     * response is treated like any other, regardless of its text.
+     * When this attribute is set to {@code true}, the first line of the 
response is treated like any other, regardless
+     * of its text.
      */
     protected boolean ignoreResponseConstraint = false;
 
@@ -132,9 +130,8 @@ public abstract class AbstractCatalinaTask extends 
BaseRedirectorHelperTask {
     // --------------------------------------------------------- Public Methods
 
     /**
-     * Execute the specified command. This logic only performs the common
-     * attribute validation required by all subclasses; it does not perform any
-     * functional logic directly.
+     * Execute the specified command. This logic only performs the common 
attribute validation required by all
+     * subclasses; it does not perform any functional logic directly.
      *
      * @exception BuildException if a validation error occurs
      */
@@ -159,19 +156,18 @@ public abstract class AbstractCatalinaTask extends 
BaseRedirectorHelperTask {
 
 
     /**
-     * Execute the specified command, based on the configured properties. The
-     * input stream will be closed upon completion of this task, whether it was
-     * executed successfully or not.
+     * Execute the specified command, based on the configured properties. The 
input stream will be closed upon
+     * completion of this task, whether it was executed successfully or not.
      *
-     * @param command Command to be executed
-     * @param istream InputStream to include in an HTTP PUT, if any
-     * @param contentType Content type to specify for the input, if any
+     * @param command       Command to be executed
+     * @param istream       InputStream to include in an HTTP PUT, if any
+     * @param contentType   Content type to specify for the input, if any
      * @param contentLength Content length to specify for the input, if any
      *
      * @exception BuildException if an error occurs
      */
     public void execute(String command, InputStream istream, String 
contentType, long contentLength)
-                    throws BuildException {
+            throws BuildException {
 
         URLConnection conn = null;
         InputStreamReader reader = null;
@@ -289,19 +285,13 @@ public abstract class AbstractCatalinaTask extends 
BaseRedirectorHelperTask {
 
 
     /*
-     * This is a hack.
-     * We need to use streaming to avoid OOME on large uploads.
-     * We'd like to use Authenticator.setDefault() for authentication as the 
JRE
-     * then provides the DIGEST client implementation.
-     * However, the above two are not compatible. When the request is made, the
-     * resulting 401 triggers an exception because, when using streams, the
-     * InputStream is no longer available to send with the repeated request 
that
-     * now includes the appropriate Authorization header.
-     * The hack is to make a simple OPTIONS request- i.e. without a request
-     * body.
-     * This triggers authentication and the requirement to authenticate for 
this
-     * host is cached and used to provide an appropriate Authorization when the
-     * next request is made (that includes a request body).
+     * This is a hack. We need to use streaming to avoid OOME on large 
uploads. We'd like to use
+     * Authenticator.setDefault() for authentication as the JRE then provides 
the DIGEST client implementation. However,
+     * the above two are not compatible. When the request is made, the 
resulting 401 triggers an exception because, when
+     * using streams, the InputStream is no longer available to send with the 
repeated request that now includes the
+     * appropriate Authorization header. The hack is to make a simple OPTIONS 
request- i.e. without a request body.This
+     * triggers authentication and the requirement to authenticate for this 
host is cached and used to provide an
+     * appropriate Authorization when the next request is made (that includes 
a request body).
      */
     private void preAuthenticate() throws IOException, URISyntaxException {
         URLConnection conn = null;
diff --git a/java/org/apache/catalina/ant/BaseRedirectorHelperTask.java 
b/java/org/apache/catalina/ant/BaseRedirectorHelperTask.java
index 7e4d7c3892..0316faad45 100644
--- a/java/org/apache/catalina/ant/BaseRedirectorHelperTask.java
+++ b/java/org/apache/catalina/ant/BaseRedirectorHelperTask.java
@@ -28,20 +28,16 @@ import org.apache.tools.ant.taskdefs.Redirector;
 import org.apache.tools.ant.types.RedirectorElement;
 
 /**
- * Abstract base class to add output redirection support for Catalina Ant 
tasks.
- * These tasks require Ant 1.5 or later.
+ * Abstract base class to add output redirection support for Catalina Ant 
tasks. These tasks require Ant 1.5 or later.
  * <br>
- * <strong>WARNING:</strong> due to depends chain, Ant could call a Task more
- * than once and this can affect the output redirection when configured. If you
- * are collecting the output in a property, it will collect the output of only
- * the first run, since Ant properties are immutable and once created they
- * cannot be changed. <br>
- * If you are collecting output in a file the file will be overwritten with the
- * output of the last run, unless you set append="true", in which case each run
- * will append it's output to the file.
- *
+ * <strong>WARNING:</strong> due to depends chain, Ant could call a Task more 
than once and this can affect the output
+ * redirection when configured. If you are collecting the output in a 
property, it will collect the output of only the
+ * first run, since Ant properties are immutable and once created they cannot 
be changed. <br>
+ * If you are collecting output in a file the file will be overwritten with 
the output of the last run, unless you set
+ * append="true", in which case each run will append it's output to the file.
  *
  * @author Gabriele Garuglieri
+ *
  * @since 5.5
  */
 public abstract class BaseRedirectorHelperTask extends Task {
@@ -65,37 +61,31 @@ public abstract class BaseRedirectorHelperTask extends Task 
{
     PrintStream redirectErrPrintStream = null;
 
     /**
-     * Whether to fail (with a BuildException) if ManagerServlet returns an
-     * error. The default behavior is to do so. <b> This flag does not control
-     * parameters checking. If the task is called with wrong or invalid
-     * parameters, it will throw BuildException independently from the setting
-     * of this flag. </b>
+     * Whether to fail (with a BuildException) if ManagerServlet returns an 
error. The default behavior is to do so. <b>
+     * This flag does not control parameters checking. If the task is called 
with wrong or invalid parameters, it will
+     * throw BuildException independently from the setting of this flag. </b>
      */
     protected boolean failOnError = true;
 
     /**
-     * <code>true</code> true when output redirection is requested for this 
task.
-     * Default is to log on Ant log.
+     * <code>true</code> true when output redirection is requested for this 
task. Default is to log on Ant log.
      */
     protected boolean redirectOutput = false;
 
     /**
-     * will be set to <code>true</code> when the configuration of the 
Redirector
-     * is complete.
+     * will be set to <code>true</code> when the configuration of the 
Redirector is complete.
      */
     protected boolean redirectorConfigured = false;
 
     /**
-     * Flag which indicates that, if redirected, output should also be always
-     * sent to the log. Default is that output is sent only to redirected
-     * streams.
+     * Flag which indicates that, if redirected, output should also be always 
sent to the log. Default is that output is
+     * sent only to redirected streams.
      */
     protected boolean alwaysLog = false;
 
 
     /**
-     * Whether to fail (with a BuildException) if ManagerServlet returns an
-     * error. The default behavior is to do so.
+     * Whether to fail (with a BuildException) if ManagerServlet returns an 
error. The default behavior is to do so.
      *
      * @param fail The new value of failonerror
      */
@@ -107,8 +97,7 @@ public abstract class BaseRedirectorHelperTask extends Task {
     /**
      * Returns the value of the failOnError property.
      *
-     * @return <code>true</code> if the task should will if an error occurs,
-     *         otherwise <code>false</code>
+     * @return <code>true</code> if the task should will if an error occurs, 
otherwise <code>false</code>
      */
     public boolean isFailOnError() {
         return failOnError;
@@ -130,7 +119,6 @@ public abstract class BaseRedirectorHelperTask extends Task 
{
      * File the error output of the task is redirected to.
      *
      * @param error name of the error file
-     *
      */
     public void setError(File error) {
         redirector.setError(error);
@@ -139,11 +127,10 @@ public abstract class BaseRedirectorHelperTask extends 
Task {
 
 
     /**
-     * Controls whether error output is logged. This is only useful when output
-     * is being redirected and error output is desired in the Ant log
+     * Controls whether error output is logged. This is only useful when 
output is being redirected and error output is
+     * desired in the Ant log
      *
-     * @param logError if true the standard error is sent to the Ant log system
-     *            and not sent to output stream.
+     * @param logError if true the standard error is sent to the Ant log 
system and not sent to output stream.
      */
     public void setLogError(boolean logError) {
         redirector.setLogError(logError);
@@ -155,7 +142,6 @@ public abstract class BaseRedirectorHelperTask extends Task 
{
      * Property name whose value should be set to the output of the task.
      *
      * @param outputProperty property name
-     *
      */
     public void setOutputproperty(String outputProperty) {
         redirector.setOutputProperty(outputProperty);
@@ -167,7 +153,6 @@ public abstract class BaseRedirectorHelperTask extends Task 
{
      * Property name whose value should be set to the error of the task.
      *
      * @param errorProperty property name
-     *
      */
     public void setErrorProperty(String errorProperty) {
         redirector.setErrorProperty(errorProperty);
@@ -179,7 +164,6 @@ public abstract class BaseRedirectorHelperTask extends Task 
{
      * If true, append output to existing file.
      *
      * @param append if true, append output to existing file
-     *
      */
     public void setAppend(boolean append) {
         redirector.setAppend(append);
@@ -188,12 +172,9 @@ public abstract class BaseRedirectorHelperTask extends 
Task {
 
 
     /**
-     * If true, (error and non-error) output will be redirected as specified
-     * while being sent to Ant's logging mechanism as if no redirection had
-     * taken place. Defaults to false.
-     * <br>
-     * Actually handled internally, with Ant 1.6.3 it will be handled by the
-     * <code>Redirector</code> itself.
+     * If true, (error and non-error) output will be redirected as specified 
while being sent to Ant's logging mechanism
+     * as if no redirection had taken place. Defaults to false. <br>
+     * Actually handled internally, with Ant 1.6.3 it will be handled by the 
<code>Redirector</code> itself.
      *
      * @param alwaysLog <code>boolean</code>
      */
@@ -204,8 +185,7 @@ public abstract class BaseRedirectorHelperTask extends Task 
{
 
 
     /**
-     * Whether output and error files should be created even when empty.
-     * Defaults to true.
+     * Whether output and error files should be created even when empty. 
Defaults to true.
      *
      * @param createEmptyFiles <CODE>boolean</CODE>.
      */
@@ -238,9 +218,8 @@ public abstract class BaseRedirectorHelperTask extends Task 
{
             redirectOutput = true;
         }
         /*
-         * Due to depends chain, Ant could call the Task more than once, this 
is
-         * to prevent that we attempt to configure uselessly more than once the
-         * Redirector.
+         * Due to depends chain, Ant could call the Task more than once, this 
is to prevent that we attempt to configure
+         * uselessly more than once the Redirector.
          */
         redirectorConfigured = true;
     }
@@ -264,10 +243,9 @@ public abstract class BaseRedirectorHelperTask extends 
Task {
 
 
     /**
-     * Ask redirector to close all the streams. It is necessary to call this
-     * method before leaving the Task to have the Streams flush their contents.
-     * If you are collecting output in a property, it will be created only if
-     * this method is called, otherwise you'll find it unset.
+     * Ask redirector to close all the streams. It is necessary to call this 
method before leaving the Task to have the
+     * Streams flush their contents. If you are collecting output in a 
property, it will be created only if this method
+     * is called, otherwise you'll find it unset.
      */
     protected void closeRedirector() {
         try {
@@ -278,8 +256,8 @@ public abstract class BaseRedirectorHelperTask extends Task 
{
             log("Error closing redirector: " + ioe.getMessage(), 
Project.MSG_ERR);
         }
         /*
-         * Due to depends chain, Ant could call the Task more than once, this 
is
-         * to prevent that we attempt to reuse the previously closed Streams.
+         * Due to depends chain, Ant could call the Task more than once, this 
is to prevent that we attempt to reuse the
+         * previously closed Streams.
          */
         redirectOutStream = null;
         redirectOutPrintStream = null;
@@ -313,7 +291,6 @@ public abstract class BaseRedirectorHelperTask extends Task 
{
      * Handles output with the INFO priority and flushes the stream.
      *
      * @param output The output to log. Should not be <code>null</code>.
-     *
      */
     @Override
     protected void handleFlush(String output) {
@@ -347,7 +324,6 @@ public abstract class BaseRedirectorHelperTask extends Task 
{
      * Handles error output with the ERR priority and flushes the stream.
      *
      * @param output The error output to log. Should not be <code>null</code>.
-     *
      */
     @Override
     protected void handleErrorFlush(String output) {
@@ -357,10 +333,9 @@ public abstract class BaseRedirectorHelperTask extends 
Task {
 
 
     /**
-     * Handles output with ERR priority to error stream and all other 
priorities
-     * to output stream.
+     * Handles output with ERR priority to error stream and all other 
priorities to output stream.
      *
-     * @param output The output to log. Should not be <code>null</code>.
+     * @param output   The output to log. Should not be <code>null</code>.
      * @param priority The priority level that should be used
      */
     protected void handleOutput(String output, int priority) {
diff --git a/java/org/apache/catalina/ant/DeployTask.java 
b/java/org/apache/catalina/ant/DeployTask.java
index bf4bc673e9..2ae8650fc6 100644
--- a/java/org/apache/catalina/ant/DeployTask.java
+++ b/java/org/apache/catalina/ant/DeployTask.java
@@ -30,10 +30,10 @@ import java.util.regex.Pattern;
 import org.apache.tools.ant.BuildException;
 
 /**
- * Ant task that implements the <code>/deploy</code> command, supported by the
- * Tomcat manager application.
+ * Ant task that implements the <code>/deploy</code> command, supported by the 
Tomcat manager application.
  *
  * @author Craig R. McClanahan
+ *
  * @since 4.1
  */
 public class DeployTask extends AbstractCatalinaCommandTask {
@@ -55,8 +55,7 @@ public class DeployTask extends AbstractCatalinaCommandTask {
 
 
     /**
-     * URL of the server local web application archive (WAR) file to be
-     * deployed.
+     * URL of the server local web application archive (WAR) file to be 
deployed.
      */
     protected String localWar = null;
 
@@ -123,8 +122,7 @@ public class DeployTask extends AbstractCatalinaCommandTask 
{
             throw new BuildException("Must specify 'path' attribute");
         }
         if ((war == null) && (localWar == null) && (config == null) && (tag == 
null)) {
-            throw new BuildException(
-                            "Must specify either 'war', 'localWar', 'config', 
or 'tag' attribute");
+            throw new BuildException("Must specify either 'war', 'localWar', 
'config', or 'tag' attribute");
         }
         // Building an input stream on the WAR to upload, if any
         BufferedInputStream stream = null;
@@ -141,7 +139,7 @@ public class DeployTask extends AbstractCatalinaCommandTask 
{
                     throw new BuildException(e);
                 }
             } else {
-                FileInputStream fsInput= null;
+                FileInputStream fsInput = null;
                 try {
                     fsInput = new FileInputStream(war);
                     FileChannel fsChannel = fsInput.getChannel();
diff --git a/java/org/apache/catalina/ant/FindLeaksTask.java 
b/java/org/apache/catalina/ant/FindLeaksTask.java
index 4be09969a8..3eb44df7d3 100644
--- a/java/org/apache/catalina/ant/FindLeaksTask.java
+++ b/java/org/apache/catalina/ant/FindLeaksTask.java
@@ -19,16 +19,14 @@ package org.apache.catalina.ant;
 import org.apache.tools.ant.BuildException;
 
 /**
- * Ant task that implements the <code>/findleaks</code> command, supported by
- * the Tomcat manager application.
+ * Ant task that implements the <code>/findleaks</code> command, supported by 
the Tomcat manager application.
  */
 public class FindLeaksTask extends AbstractCatalinaTask {
 
     private boolean statusLine = true;
 
     /**
-     * Sets the statusLine parameter that controls if the response includes a
-     * status line or not.
+     * Sets the statusLine parameter that controls if the response includes a 
status line or not.
      *
      * @param statusLine <code>true</code> if the status line should be 
included
      */
@@ -37,11 +35,9 @@ public class FindLeaksTask extends AbstractCatalinaTask {
     }
 
     /**
-     * Returns the statusLine parameter that controls if the response includes 
a
-     * status line or not.
+     * Returns the statusLine parameter that controls if the response includes 
a status line or not.
      *
-     * @return <code>true</code> if the status line should be included,
-     *         otherwise <code>false</code>
+     * @return <code>true</code> if the status line should be included, 
otherwise <code>false</code>
      */
     public boolean getStatusLine() {
         return statusLine;
diff --git a/java/org/apache/catalina/ant/JKStatusUpdateTask.java 
b/java/org/apache/catalina/ant/JKStatusUpdateTask.java
index 4f322b74f7..b24f02110a 100644
--- a/java/org/apache/catalina/ant/JKStatusUpdateTask.java
+++ b/java/org/apache/catalina/ant/JKStatusUpdateTask.java
@@ -22,10 +22,10 @@ import java.net.URLEncoder;
 import org.apache.tools.ant.BuildException;
 
 /**
- * Ant task that implements the <code>/status</code> command, supported by the
- * mod_jk status (1.2.9) application.
+ * Ant task that implements the <code>/status</code> command, supported by the 
mod_jk status (1.2.9) application.
  *
  * @author Peter Rossbach
+ *
  * @since 5.5.9
  */
 public class JKStatusUpdateTask extends AbstractCatalinaTask {
@@ -74,8 +74,7 @@ public class JKStatusUpdateTask extends AbstractCatalinaTask {
     }
 
     /**
-     * @param internalid
-     *            The internalid to set.
+     * @param internalid The internalid to set.
      */
     public void setInternalid(int internalid) {
         this.internalid = internalid;
@@ -89,8 +88,7 @@ public class JKStatusUpdateTask extends AbstractCatalinaTask {
     }
 
     /**
-     * @param lbForceSession
-     *            The lbForceSession to set.
+     * @param lbForceSession The lbForceSession to set.
      */
     public void setLbForceSession(Boolean lbForceSession) {
         this.lbForceSession = lbForceSession;
@@ -104,8 +102,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
     }
 
     /**
-     * @param lbRecovertime
-     *            The lbRecovertime to set.
+     * @param lbRecovertime The lbRecovertime to set.
      */
     public void setLbRecovertime(Integer lbRecovertime) {
         this.lbRecovertime = lbRecovertime;
@@ -119,8 +116,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
     }
 
     /**
-     * @param lbRetries
-     *            The lbRetries to set.
+     * @param lbRetries The lbRetries to set.
      */
     public void setLbRetries(Integer lbRetries) {
         this.lbRetries = lbRetries;
@@ -134,8 +130,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
     }
 
     /**
-     * @param lbStickySession
-     *            The lbStickySession to set.
+     * @param lbStickySession The lbStickySession to set.
      */
     public void setLbStickySession(Boolean lbStickySession) {
         this.lbStickySession = lbStickySession;
@@ -149,8 +144,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
     }
 
     /**
-     * @param worker
-     *            The worker to set.
+     * @param worker The worker to set.
      */
     public void setWorker(String worker) {
         this.worker = worker;
@@ -164,8 +158,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
     }
 
     /**
-     * @param workerType
-     *            The workerType to set.
+     * @param workerType The workerType to set.
      */
     public void setWorkerType(String workerType) {
         this.workerType = workerType;
@@ -179,8 +172,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
     }
 
     /**
-     * @param workerLb
-     *            The workerLb to set.
+     * @param workerLb The workerLb to set.
      */
     public void setWorkerLb(String workerLb) {
         this.workerLb = workerLb;
@@ -194,8 +186,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
     }
 
     /**
-     * @param workerClusterDomain
-     *            The workerClusterDomain to set.
+     * @param workerClusterDomain The workerClusterDomain to set.
      */
     public void setWorkerClusterDomain(String workerClusterDomain) {
         this.workerClusterDomain = workerClusterDomain;
@@ -209,8 +200,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
     }
 
     /**
-     * @param workerDisabled
-     *            The workerDisabled to set.
+     * @param workerDisabled The workerDisabled to set.
      */
     public void setWorkerDisabled(Boolean workerDisabled) {
         this.workerDisabled = workerDisabled;
@@ -238,8 +228,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
     }
 
     /**
-     * @param workerLoadFactor
-     *            The workerLoadFactor to set.
+     * @param workerLoadFactor The workerLoadFactor to set.
      */
     public void setWorkerLoadFactor(Integer workerLoadFactor) {
         this.workerLoadFactor = workerLoadFactor;
@@ -253,8 +242,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
     }
 
     /**
-     * @param workerRedirect
-     *            The workerRedirect to set.
+     * @param workerRedirect The workerRedirect to set.
      */
     public void setWorkerRedirect(String workerRedirect) {
         this.workerRedirect = workerRedirect;
@@ -263,8 +251,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
     /**
      * Execute the requested operation.
      *
-     * @exception BuildException
-     *                if an error occurs
+     * @exception BuildException if an error occurs
      */
     @Override
     public void execute() throws BuildException {
@@ -279,11 +266,8 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
     /**
      * Create JkStatus link
      * <ul>
-     * <li><b>load balance example:
-     * 
</b>http://localhost/status?cmd=update&mime=txt&w=lb&lf=false&ls=true</li>
-     * <li><b>worker example:
-     * 
</b>http://localhost/status?cmd=update&mime=txt&w=node1&l=lb&wf=1&wd=false&ws=false
-     * </li>
+     * <li><b>load balance example: 
</b>http://localhost/status?cmd=update&mime=txt&w=lb&lf=false&ls=true</li>
+     * <li><b>worker example: 
</b>http://localhost/status?cmd=update&mime=txt&w=node1&l=lb&wf=1&wd=false&ws=false</li>
      * </ul>
      *
      * @return create jkstatus link
@@ -297,7 +281,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
             sb.append(URLEncoder.encode(worker, getCharset()));
 
             if (isLBMode) {
-                
//http://localhost/status?cmd=update&mime=txt&w=lb&lf=false&ls=true
+                // 
http://localhost/status?cmd=update&mime=txt&w=lb&lf=false&ls=true
                 if ((lbRetries != null)) { // > 0
                     sb.append("&lr=");
                     sb.append(lbRetries);
@@ -315,7 +299,7 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
                     sb.append(lbForceSession);
                 }
             } else {
-                
//http://localhost/status?cmd=update&mime=txt&w=node1&l=lb&wf=1&wd=false&ws=false
+                // 
http://localhost/status?cmd=update&mime=txt&w=node1&l=lb&wf=1&wd=false&ws=false
                 if ((workerLb != null)) { // must be configured
                     sb.append("&l=");
                     sb.append(URLEncoder.encode(workerLb, getCharset()));
@@ -337,14 +321,12 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
                 }
                 if ((workerClusterDomain != null)) {
                     sb.append("&wc=");
-                    sb.append(URLEncoder.encode(workerClusterDomain,
-                            getCharset()));
+                    sb.append(URLEncoder.encode(workerClusterDomain, 
getCharset()));
                 }
             }
 
         } catch (UnsupportedEncodingException e) {
-            throw new BuildException("Invalid 'charset' attribute: "
-                    + getCharset());
+            throw new BuildException("Invalid 'charset' attribute: " + 
getCharset());
         }
         return sb;
     }
@@ -362,54 +344,44 @@ public class JKStatusUpdateTask extends 
AbstractCatalinaTask {
         if ("lb".equals(workerType)) {
             if (lbRecovertime == null && lbRetries == null) {
                 throw new BuildException(
-                        "Must specify at a lb worker either 'lbRecovertime' or"
-                                + "'lbRetries' attribute");
+                        "Must specify at a lb worker either 'lbRecovertime' 
or" + "'lbRetries' attribute");
             }
             if (lbStickySession == null || lbForceSession == null) {
-                throw new BuildException("Must specify at a lb worker either"
-                        + "'lbStickySession' and 'lbForceSession' attribute");
+                throw new BuildException(
+                        "Must specify at a lb worker either" + 
"'lbStickySession' and 'lbForceSession' attribute");
             }
             if (null != lbRecovertime && 60 < lbRecovertime.intValue()) {
-                throw new BuildException(
-                        "The 'lbRecovertime' must be greater than 59");
+                throw new BuildException("The 'lbRecovertime' must be greater 
than 59");
             }
             if (null != lbRetries && 1 < lbRetries.intValue()) {
-                throw new BuildException(
-                        "The 'lbRetries' must be greater than 1");
+                throw new BuildException("The 'lbRetries' must be greater than 
1");
             }
             isLBMode = true;
         } else if ("worker".equals(workerType)) {
             if (workerDisabled == null) {
-                throw new BuildException(
-                        "Must specify at a node worker 'workerDisabled' 
attribute");
+                throw new BuildException("Must specify at a node worker 
'workerDisabled' attribute");
             }
             if (workerStopped == null) {
-                throw new BuildException(
-                        "Must specify at a node worker 'workerStopped' 
attribute");
+                throw new BuildException("Must specify at a node worker 
'workerStopped' attribute");
             }
-            if (workerLoadFactor == null ) {
-                throw new BuildException(
-                        "Must specify at a node worker 'workerLoadFactor' 
attribute");
+            if (workerLoadFactor == null) {
+                throw new BuildException("Must specify at a node worker 
'workerLoadFactor' attribute");
             }
             if (workerClusterDomain == null) {
-                throw new BuildException(
-                        "Must specify at a node worker 'workerClusterDomain' 
attribute");
+                throw new BuildException("Must specify at a node worker 
'workerClusterDomain' attribute");
             }
             if (workerRedirect == null) {
-                throw new BuildException(
-                        "Must specify at a node worker 'workerRedirect' 
attribute");
+                throw new BuildException("Must specify at a node worker 
'workerRedirect' attribute");
             }
             if (workerLb == null) {
                 throw new BuildException("Must specify 'workerLb' attribute");
             }
             if (workerLoadFactor.intValue() < 1) {
-                throw new BuildException(
-                        "The 'workerLoadFactor' must be greater or equal 1");
+                throw new BuildException("The 'workerLoadFactor' must be 
greater or equal 1");
             }
             isLBMode = false;
         } else {
-            throw new BuildException(
-                    "Only 'lb' and 'worker' supported as workerType 
attribute");
+            throw new BuildException("Only 'lb' and 'worker' supported as 
workerType attribute");
         }
     }
 }
\ No newline at end of file
diff --git a/java/org/apache/catalina/ant/JMXGetTask.java 
b/java/org/apache/catalina/ant/JMXGetTask.java
index fd0ba47ff4..b9d1c488b1 100644
--- a/java/org/apache/catalina/ant/JMXGetTask.java
+++ b/java/org/apache/catalina/ant/JMXGetTask.java
@@ -24,8 +24,8 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the JMX Get command (<code>/jmxproxy/?get</code>)
- * supported by the Tomcat manager application.
+ * Ant task that implements the JMX Get command (<code>/jmxproxy/?get</code>) 
supported by the Tomcat manager
+ * application.
  *
  * @author Peter Rossbach
  */
@@ -36,7 +36,7 @@ public class JMXGetTask extends AbstractCatalinaTask {
     /**
      * The full bean name
      */
-    protected String bean      = null;
+    protected String bean = null;
 
     /**
      * The attribute you wish to alter
@@ -47,33 +47,37 @@ public class JMXGetTask extends AbstractCatalinaTask {
 
     /**
      * Get method for the bean name
+     *
      * @return Bean name
      */
-    public String getBean () {
+    public String getBean() {
         return this.bean;
     }
 
     /**
      * Set method for the bean name
+     *
      * @param bean Bean name
      */
-    public void setBean (String bean) {
+    public void setBean(String bean) {
         this.bean = bean;
     }
 
     /**
      * Get method for the attribute name
+     *
      * @return Attribute name
      */
-    public String getAttribute () {
+    public String getAttribute() {
         return this.attribute;
     }
 
     /**
      * Set method for the attribute name
+     *
      * @param attribute Attribute name
      */
-    public void setAttribute (String attribute) {
+    public void setAttribute(String attribute) {
         this.attribute = attribute;
     }
 
@@ -88,11 +92,10 @@ public class JMXGetTask extends AbstractCatalinaTask {
         if (bean == null || attribute == null) {
             throw new BuildException("Must specify 'bean' and 'attribute' 
attributes");
         }
-        log("Getting attribute " + attribute +
-                " in bean " + bean );
+        log("Getting attribute " + attribute + " in bean " + bean);
         try {
-            execute("/jmxproxy/?get=" + URLEncoder.encode(bean, getCharset())
-                    + "&att=" + URLEncoder.encode(attribute, getCharset()));
+            execute("/jmxproxy/?get=" + URLEncoder.encode(bean, getCharset()) 
+ "&att=" +
+                    URLEncoder.encode(attribute, getCharset()));
         } catch (UnsupportedEncodingException e) {
             throw new BuildException("Invalid 'charset' attribute: " + 
getCharset());
         }
diff --git a/java/org/apache/catalina/ant/JMXQueryTask.java 
b/java/org/apache/catalina/ant/JMXQueryTask.java
index d239efb98e..26565d9b97 100644
--- a/java/org/apache/catalina/ant/JMXQueryTask.java
+++ b/java/org/apache/catalina/ant/JMXQueryTask.java
@@ -24,8 +24,8 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the JMX Query command
- * (<code>/jmxproxy/?qry</code>) supported by the Tomcat manager application.
+ * Ant task that implements the JMX Query command 
(<code>/jmxproxy/?qry</code>) supported by the Tomcat manager
+ * application.
  *
  * @author Vivek Chopra
  */
@@ -35,32 +35,37 @@ public class JMXQueryTask extends AbstractCatalinaTask {
 
     /**
      * The JMX query string
+     *
      * @see #setQuery(String)
      */
-    protected String query      = null;
+    protected String query = null;
 
     // Public Methods
 
     /**
      * Get method for the JMX query string
+     *
      * @return Query string
      */
-    public String getQuery () {
+    public String getQuery() {
         return this.query;
     }
 
     /**
      * Set method for the JMX query string.
-    * <p>Examples of query format:</p>
+     * <p>
+     * Examples of query format:
+     * </p>
      * <UL>
      * <LI>*:*</LI>
      * <LI>*:type=RequestProcessor,*</LI>
      * <LI>*:j2eeType=Servlet,*</LI>
      * <LI>Catalina:type=Environment,resourcetype=Global,name=simpleValue</LI>
      * </UL>
+     *
      * @param query JMX Query string
      */
-    public void setQuery (String query) {
+    public void setQuery(String query) {
         this.query = query;
     }
 
@@ -83,6 +88,6 @@ public class JMXQueryTask extends AbstractCatalinaTask {
             }
         }
         log("Query string is " + queryString);
-        execute ("/jmxproxy/" + queryString);
+        execute("/jmxproxy/" + queryString);
     }
 }
diff --git a/java/org/apache/catalina/ant/JMXSetTask.java 
b/java/org/apache/catalina/ant/JMXSetTask.java
index 547669aef7..3e2573829b 100644
--- a/java/org/apache/catalina/ant/JMXSetTask.java
+++ b/java/org/apache/catalina/ant/JMXSetTask.java
@@ -24,8 +24,8 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the JMX Set command (<code>/jmxproxy/?set</code>)
- * supported by the Tomcat manager application.
+ * Ant task that implements the JMX Set command (<code>/jmxproxy/?set</code>) 
supported by the Tomcat manager
+ * application.
  *
  * @author Vivek Chopra
  */
@@ -36,7 +36,7 @@ public class JMXSetTask extends AbstractCatalinaTask {
     /**
      * The full bean name
      */
-    protected String bean      = null;
+    protected String bean = null;
 
     /**
      * The attribute you wish to alter
@@ -46,55 +46,61 @@ public class JMXSetTask extends AbstractCatalinaTask {
     /**
      * The new value for the attribute
      */
-    protected String value     = null;
+    protected String value = null;
 
     // Public Methods
 
     /**
      * Get method for the bean name
+     *
      * @return Bean name
      */
-    public String getBean () {
+    public String getBean() {
         return this.bean;
     }
 
     /**
      * Set method for the bean name
+     *
      * @param bean Bean name
      */
-    public void setBean (String bean) {
+    public void setBean(String bean) {
         this.bean = bean;
     }
 
     /**
      * Get method for the attribute name
+     *
      * @return Attribute name
      */
-    public String getAttribute () {
+    public String getAttribute() {
         return this.attribute;
     }
 
     /**
      * Set method for the attribute name
+     *
      * @param attribute Attribute name
      */
-    public void setAttribute (String attribute) {
+    public void setAttribute(String attribute) {
         this.attribute = attribute;
     }
 
     /**
      * Get method for the attribute value
+     *
      * @return Attribute value
      */
-    public String getValue () {
+    public String getValue() {
         return this.value;
     }
 
     /**
      * Set method for the attribute value.
+     *
      * @param value Attribute value
      */
-    public void setValue (String value) {
+    public void setValue(String value) {
         this.value = value;
     }
 
@@ -109,13 +115,10 @@ public class JMXSetTask extends AbstractCatalinaTask {
         if (bean == null || attribute == null || value == null) {
             throw new BuildException("Must specify 'bean', 'attribute' and 
'value' attributes");
         }
-        log("Setting attribute " + attribute +
-                            " in bean " + bean +
-                            " to " + value);
+        log("Setting attribute " + attribute + " in bean " + bean + " to " + 
value);
         try {
-            execute("/jmxproxy/?set=" + URLEncoder.encode(bean, getCharset())
-                    + "&att=" + URLEncoder.encode(attribute, getCharset())
-                    + "&val=" + URLEncoder.encode(value, getCharset()));
+            execute("/jmxproxy/?set=" + URLEncoder.encode(bean, getCharset()) 
+ "&att=" +
+                    URLEncoder.encode(attribute, getCharset()) + "&val=" + 
URLEncoder.encode(value, getCharset()));
         } catch (UnsupportedEncodingException e) {
             throw new BuildException("Invalid 'charset' attribute: " + 
getCharset());
         }
diff --git a/java/org/apache/catalina/ant/ListTask.java 
b/java/org/apache/catalina/ant/ListTask.java
index eeab9cd84f..378f04fcf9 100644
--- a/java/org/apache/catalina/ant/ListTask.java
+++ b/java/org/apache/catalina/ant/ListTask.java
@@ -21,10 +21,10 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the <code>/list</code> command, supported by the
- * Tomcat manager application.
+ * Ant task that implements the <code>/list</code> command, supported by the 
Tomcat manager application.
  *
  * @author Craig R. McClanahan
+ *
  * @since 4.1
  */
 public class ListTask extends AbstractCatalinaTask {
diff --git a/java/org/apache/catalina/ant/ReloadTask.java 
b/java/org/apache/catalina/ant/ReloadTask.java
index 4497c6ab3a..23b824da0d 100644
--- a/java/org/apache/catalina/ant/ReloadTask.java
+++ b/java/org/apache/catalina/ant/ReloadTask.java
@@ -17,15 +17,14 @@
 package org.apache.catalina.ant;
 
 
-
 import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the <code>/reload</code> command, supported by the
- * Tomcat manager application.
+ * Ant task that implements the <code>/reload</code> command, supported by the 
Tomcat manager application.
  *
  * @author Craig R. McClanahan
+ *
  * @since 4.1
  */
 public class ReloadTask extends AbstractCatalinaCommandTask {
diff --git a/java/org/apache/catalina/ant/ResourcesTask.java 
b/java/org/apache/catalina/ant/ResourcesTask.java
index b8b6c46be6..88dfa5c3a4 100644
--- a/java/org/apache/catalina/ant/ResourcesTask.java
+++ b/java/org/apache/catalina/ant/ResourcesTask.java
@@ -24,10 +24,10 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the <code>/resources</code> command, supported by
- * the Tomcat manager application.
+ * Ant task that implements the <code>/resources</code> command, supported by 
the Tomcat manager application.
  *
  * @author Craig R. McClanahan
+ *
  * @since 4.1
  */
 public class ResourcesTask extends AbstractCatalinaTask {
@@ -37,8 +37,7 @@ public class ResourcesTask extends AbstractCatalinaTask {
 
 
     /**
-     * The fully qualified class name of the resource type being requested
-     * (if any).
+     * The fully qualified class name of the resource type being requested (if 
any).
      */
     protected String type = null;
 
@@ -65,8 +64,7 @@ public class ResourcesTask extends AbstractCatalinaTask {
         super.execute();
         if (type != null) {
             try {
-                execute("/resources?type=" +
-                        URLEncoder.encode(type, getCharset()));
+                execute("/resources?type=" + URLEncoder.encode(type, 
getCharset()));
             } catch (UnsupportedEncodingException e) {
                 throw new BuildException("Invalid 'charset' attribute: " + 
getCharset());
             }
diff --git a/java/org/apache/catalina/ant/ServerinfoTask.java 
b/java/org/apache/catalina/ant/ServerinfoTask.java
index f8c2cedc9b..d15ac86cb2 100644
--- a/java/org/apache/catalina/ant/ServerinfoTask.java
+++ b/java/org/apache/catalina/ant/ServerinfoTask.java
@@ -21,8 +21,7 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the <code>/serverinfo</code> command
- * supported by the Tomcat manager application.
+ * Ant task that implements the <code>/serverinfo</code> command supported by 
the Tomcat manager application.
  *
  * @author Vivek Chopra
  */
diff --git a/java/org/apache/catalina/ant/SessionsTask.java 
b/java/org/apache/catalina/ant/SessionsTask.java
index 3649ceb75b..78f3ce5ece 100644
--- a/java/org/apache/catalina/ant/SessionsTask.java
+++ b/java/org/apache/catalina/ant/SessionsTask.java
@@ -21,8 +21,7 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the <code>/sessions</code> command
- * supported by the Tomcat manager application.
+ * Ant task that implements the <code>/sessions</code> command supported by 
the Tomcat manager application.
  *
  * @author Vivek Chopra
  */
diff --git a/java/org/apache/catalina/ant/SslConnectorCiphersTask.java 
b/java/org/apache/catalina/ant/SslConnectorCiphersTask.java
index 45826a85df..2a96fcffab 100644
--- a/java/org/apache/catalina/ant/SslConnectorCiphersTask.java
+++ b/java/org/apache/catalina/ant/SslConnectorCiphersTask.java
@@ -21,9 +21,7 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the <code>/sslConnectorCiphers</code> command
- * supported by the Tomcat manager application.
- *
+ * Ant task that implements the <code>/sslConnectorCiphers</code> command 
supported by the Tomcat manager application.
  */
 public class SslConnectorCiphersTask extends AbstractCatalinaTask {
 
diff --git a/java/org/apache/catalina/ant/StartTask.java 
b/java/org/apache/catalina/ant/StartTask.java
index 5eb3c464f8..cbf68f1065 100644
--- a/java/org/apache/catalina/ant/StartTask.java
+++ b/java/org/apache/catalina/ant/StartTask.java
@@ -21,10 +21,10 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the <code>/start</code> command, supported by the
- * Tomcat manager application.
+ * Ant task that implements the <code>/start</code> command, supported by the 
Tomcat manager application.
  *
  * @author Craig R. McClanahan
+ *
  * @since 4.1
  */
 public class StartTask extends AbstractCatalinaCommandTask {
diff --git a/java/org/apache/catalina/ant/StopTask.java 
b/java/org/apache/catalina/ant/StopTask.java
index 0ce063303b..c0cf0c49dc 100644
--- a/java/org/apache/catalina/ant/StopTask.java
+++ b/java/org/apache/catalina/ant/StopTask.java
@@ -21,10 +21,10 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the <code>/stop</code> command, supported by the
- * Tomcat manager application.
+ * Ant task that implements the <code>/stop</code> command, supported by the 
Tomcat manager application.
  *
  * @author Craig R. McClanahan
+ *
  * @since 4.1
  */
 public class StopTask extends AbstractCatalinaCommandTask {
diff --git a/java/org/apache/catalina/ant/ThreaddumpTask.java 
b/java/org/apache/catalina/ant/ThreaddumpTask.java
index 007da3367f..cef554fefe 100644
--- a/java/org/apache/catalina/ant/ThreaddumpTask.java
+++ b/java/org/apache/catalina/ant/ThreaddumpTask.java
@@ -21,9 +21,7 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the <code>/threaddump</code> command
- * supported by the Tomcat manager application.
- *
+ * Ant task that implements the <code>/threaddump</code> command supported by 
the Tomcat manager application.
  */
 public class ThreaddumpTask extends AbstractCatalinaTask {
 
diff --git a/java/org/apache/catalina/ant/UndeployTask.java 
b/java/org/apache/catalina/ant/UndeployTask.java
index 15e8991c49..fd44b0a71f 100644
--- a/java/org/apache/catalina/ant/UndeployTask.java
+++ b/java/org/apache/catalina/ant/UndeployTask.java
@@ -21,10 +21,10 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the <code>/undeploy</code> command, supported by
- * the Tomcat manager application.
+ * Ant task that implements the <code>/undeploy</code> command, supported by 
the Tomcat manager application.
  *
  * @author Craig R. McClanahan
+ *
  * @since 4.1
  */
 public class UndeployTask extends AbstractCatalinaCommandTask {
diff --git a/java/org/apache/catalina/ant/ValidatorTask.java 
b/java/org/apache/catalina/ant/ValidatorTask.java
index 3ce62b60f5..72b85324d1 100644
--- a/java/org/apache/catalina/ant/ValidatorTask.java
+++ b/java/org/apache/catalina/ant/ValidatorTask.java
@@ -29,10 +29,10 @@ import org.xml.sax.InputSource;
 
 
 /**
- * Task for validating a web application deployment descriptor, using XML
- * schema validation.
+ * Task for validating a web application deployment descriptor, using XML 
schema validation.
  *
  * @author Remy Maucherat
+ *
  * @since 5.0
  */
 public class ValidatorTask extends BaseRedirectorHelperTask {
@@ -61,9 +61,8 @@ public class ValidatorTask extends BaseRedirectorHelperTask {
     // --------------------------------------------------------- Public Methods
 
     /**
-     * Execute the specified command.  This logic only performs the common
-     * attribute validation required by all subclasses; it does not perform
-     * any functional logic directly.
+     * Execute the specified command. This logic only performs the common 
attribute validation required by all
+     * subclasses; it does not perform any functional logic directly.
      *
      * @exception BuildException if a validation error occurs
      */
diff --git a/java/org/apache/catalina/ant/VminfoTask.java 
b/java/org/apache/catalina/ant/VminfoTask.java
index 52394cca26..6fccbc9e90 100644
--- a/java/org/apache/catalina/ant/VminfoTask.java
+++ b/java/org/apache/catalina/ant/VminfoTask.java
@@ -21,9 +21,7 @@ import org.apache.tools.ant.BuildException;
 
 
 /**
- * Ant task that implements the <code>/vminfo</code> command
- * supported by the Tomcat manager application.
- *
+ * Ant task that implements the <code>/vminfo</code> command supported by the 
Tomcat manager application.
  */
 public class VminfoTask extends AbstractCatalinaTask {
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to