Javadoc
diff --git a/src/main/java/org/apache/commons/exec/CommandLine.java b/src/main/java/org/apache/commons/exec/CommandLine.java index 8d2207a..bd96803 100644 --- a/src/main/java/org/apache/commons/exec/CommandLine.java +++ b/src/main/java/org/apache/commons/exec/CommandLine.java
@@ -67,7 +67,7 @@ /** * Create a command line from a string. * - * @param line the first element becomes the executable, the rest the arguments. + * @param line The first element becomes the executable, the rest the arguments. * @return The parsed command line. * @throws IllegalArgumentException If line is null or all whitespace. */ @@ -78,8 +78,8 @@ /** * Create a command line from a string. * - * @param line the first element becomes the executable, the rest the arguments. - * @param substitutionMap the name/value pairs used for substitution. + * @param line The first element becomes the executable, the rest the arguments. + * @param substitutionMap The name/value pairs used for substitution. * @return The parsed command line. * @throws IllegalArgumentException If line is null or all whitespace. */ @@ -102,7 +102,7 @@ /** * Crack a command line. * - * @param toProcess the command line to process. + * @param toProcess The command line to process. * @return The command line broken into strings. An empty or null toProcess parameter results in a zero sized array. */ private static String[] translateCommandline(final String toProcess) { @@ -193,7 +193,7 @@ /** * Copy constructor. * - * @param other the instance to copy. + * @param other The instance to copy. */ public CommandLine(final CommandLine other) { this.executable = other.getExecutable(); @@ -207,7 +207,7 @@ /** * Constructs a command line without any arguments. * - * @param executable the executable file. + * @param executable The executable file. */ public CommandLine(final File executable) { this.isFile = true; @@ -217,7 +217,7 @@ /** * Constructs a command line without any arguments. * - * @param executable the executable file. + * @param executable The executable file. * @since 1.5.0 */ public CommandLine(final Path executable) { @@ -228,7 +228,7 @@ /** * Constructs a command line without any arguments. * - * @param executable the executable. + * @param executable The executable. * @throws NullPointerException on null input. * @throws IllegalArgumentException on empty input. */ @@ -324,7 +324,7 @@ /** * Expand variables in a command line argument. * - * @param argument the argument. + * @param argument The argument. * @return The expanded string. */ private String expandArgument(final String argument) { @@ -382,7 +382,7 @@ /** * Sets the substitutionMap to expand variables in the command line. * - * @param substitutionMap the map + * @param substitutionMap The map */ public void setSubstitutionMap(final Map<String, ?> substitutionMap) { this.substitutionMap = substitutionMap; @@ -391,7 +391,7 @@ /** * Cleans the executable string. The argument is trimmed and '/' and '\\' are replaced with the platform specific file separator char * - * @param dirtyExecutable the executable. + * @param dirtyExecutable The executable. * @return The platform-specific executable string. * @throws NullPointerException on null input. * @throws IllegalArgumentException on empty input.
diff --git a/src/main/java/org/apache/commons/exec/DaemonExecutor.java b/src/main/java/org/apache/commons/exec/DaemonExecutor.java index 2942e15..5492343 100644 --- a/src/main/java/org/apache/commons/exec/DaemonExecutor.java +++ b/src/main/java/org/apache/commons/exec/DaemonExecutor.java
@@ -79,8 +79,8 @@ /** * Factory method to create a thread waiting for the result of an asynchronous execution. * - * @param runnable the runnable passed to the thread. - * @param name the name of the thread. + * @param runnable The runnable passed to the thread. + * @param name The name of the thread. * @return The thread. */ @Override
diff --git a/src/main/java/org/apache/commons/exec/DefaultExecuteResultHandler.java b/src/main/java/org/apache/commons/exec/DefaultExecuteResultHandler.java index 826434f..a82645b 100644 --- a/src/main/java/org/apache/commons/exec/DefaultExecuteResultHandler.java +++ b/src/main/java/org/apache/commons/exec/DefaultExecuteResultHandler.java
@@ -119,7 +119,7 @@ * Causes the current thread to wait, if necessary, until the process has terminated. This method returns immediately if the process has already terminated. * If the process has not yet terminated, the calling thread will be blocked until the process exits. * - * @param timeout the maximum time to wait. + * @param timeout The maximum time to wait. * @throws InterruptedException if the current thread is {@linkplain Thread#interrupt() interrupted} by another thread while it is waiting, then the wait is * ended and an {@link InterruptedException} is thrown. * @since 1.4.0 @@ -135,7 +135,7 @@ * Causes the current thread to wait, if necessary, until the process has terminated. This method returns immediately if the process has already terminated. * If the process has not yet terminated, the calling thread will be blocked until the process exits. * - * @param timeoutMillis the maximum time to wait in milliseconds. + * @param timeoutMillis The maximum time to wait in milliseconds. * @throws InterruptedException if the current thread is {@linkplain Thread#interrupt() interrupted} by another thread while it is waiting, then the wait is * ended and an {@link InterruptedException} is thrown. * @deprecated Use {@link #waitFor(Duration)}.
diff --git a/src/main/java/org/apache/commons/exec/DefaultExecutor.java b/src/main/java/org/apache/commons/exec/DefaultExecutor.java index 0ef2f44..7251d4d 100644 --- a/src/main/java/org/apache/commons/exec/DefaultExecutor.java +++ b/src/main/java/org/apache/commons/exec/DefaultExecutor.java
@@ -125,7 +125,7 @@ /** * Sets the PumpStreamHandler. * - * @param executeStreamHandler the ExecuteStreamHandler, null resets to the default. + * @param executeStreamHandler The ExecuteStreamHandler, null resets to the default. * @return {@code this} instance. */ public T setExecuteStreamHandler(final ExecuteStreamHandler executeStreamHandler) { @@ -136,7 +136,7 @@ /** * Sets the ThreadFactory. * - * @param threadFactory the ThreadFactory, null resets to the default. + * @param threadFactory The ThreadFactory, null resets to the default. * @return {@code this} instance. */ public T setThreadFactory(final ThreadFactory threadFactory) { @@ -147,7 +147,7 @@ /** * Sets the working directory. * - * @param workingDirectory the working directory., null resets to the default. + * @param workingDirectory The working directory., null resets to the default. * @return {@code this} instance. */ public T setWorkingDirectory(final File workingDirectory) { @@ -158,7 +158,7 @@ /** * Sets the working directory. * - * @param workingDirectory the working directory., null resets to the default. + * @param workingDirectory The working directory., null resets to the default. * @return {@code this} instance. * @since 1.5.0 */ @@ -248,7 +248,7 @@ /** * Closes the Closeable, remembering any exception. * - * @param closeable the {@link Closeable} to close. + * @param closeable The {@link Closeable} to close. */ private void closeCatch(final Closeable closeable) { try { @@ -261,7 +261,7 @@ /** * Closes the streams belonging to the given Process. * - * @param process the {@link Process}. + * @param process The {@link Process}. */ @SuppressWarnings("resource") private void closeProcessStreams(final Process process) { @@ -273,8 +273,8 @@ /** * Creates a thread waiting for the result of an asynchronous execution. * - * @param runnable the runnable passed to the thread. - * @param name the name of the thread. + * @param runnable The runnable passed to the thread. + * @param name The name of the thread. * @return The thread */ protected Thread createThread(final Runnable runnable, final String name) { @@ -333,9 +333,9 @@ /** * Execute an internal process. If the executing thread is interrupted while waiting for the child process to return the child process will be killed. * - * @param command the command to execute. - * @param environment the execution environment. - * @param workingDirectory the working directory. + * @param command The command to execute. + * @param environment The execution environment. + * @param workingDirectory The working directory. * @param streams process the streams (in, out, err) of the process. * @return The exit code of the process. * @throws IOException executing the process failed. @@ -495,9 +495,9 @@ /** * Creates a process that runs a command. * - * @param command the command to run. - * @param env the environment for the command. - * @param workingDirectory the working directory for the command. + * @param command The command to run. + * @param env The environment for the command. + * @param workingDirectory The working directory for the command. * @return The process started. * @throws IOException forwarded from the particular launcher used. */ @@ -512,9 +512,9 @@ /** * Creates a process that runs a command. * - * @param command the command to run. - * @param env the environment for the command. - * @param workingDirectory the working directory for the command. + * @param command The command to run. + * @param env The environment for the command. + * @param workingDirectory The working directory for the command. * @return The process started. * @throws IOException forwarded from the particular launcher used. * @since 1.5.0 @@ -530,7 +530,7 @@ /** * Sets the first IOException thrown. * - * @param e the IOException. + * @param e The IOException. */ private void setExceptionCaught(final IOException e) { if (exceptionCaught == null) {
diff --git a/src/main/java/org/apache/commons/exec/ExecuteResultHandler.java b/src/main/java/org/apache/commons/exec/ExecuteResultHandler.java index 0945983..737ca2b 100644 --- a/src/main/java/org/apache/commons/exec/ExecuteResultHandler.java +++ b/src/main/java/org/apache/commons/exec/ExecuteResultHandler.java
@@ -30,14 +30,14 @@ /** * The asynchronous execution completed. * - * @param exitValue the exit value of the sub-process. + * @param exitValue The exit value of the sub-process. */ void onProcessComplete(int exitValue); /** * The asynchronous execution failed. * - * @param e the {@code ExecuteException} containing the root cause. + * @param e The {@code ExecuteException} containing the root cause. */ void onProcessFailed(ExecuteException e); }
diff --git a/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java b/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java index 72f3512..8c7d963 100644 --- a/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java +++ b/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java
@@ -86,7 +86,7 @@ /** * Sets the thread factory. * - * @param threadFactory the thread factory, null resets to the default {@link Executors#defaultThreadFactory()}. + * @param threadFactory The thread factory, null resets to the default {@link Executors#defaultThreadFactory()}. * @return {@code this} instance. */ public Builder setThreadFactory(final ThreadFactory threadFactory) { @@ -97,7 +97,7 @@ /** * Sets the timeout duration. * - * @param timeout the timeout duration, null resets to default {@link #INFINITE_TIMEOUT_DURATION}. + * @param timeout The timeout duration, null resets to default {@link #INFINITE_TIMEOUT_DURATION}. * @return {@code this} instance. */ public Builder setTimeout(final Duration timeout) { @@ -152,8 +152,8 @@ /** * Creates a new watchdog with a given timeout. * - * @param threadFactory the thread factory. - * @param timeout the timeout Duration for the process. It must be greater than 0 or {@code INFINITE_TIMEOUT_DURATION}. + * @param threadFactory The thread factory. + * @param timeout The timeout Duration for the process. It must be greater than 0 or {@code INFINITE_TIMEOUT_DURATION}. */ private ExecuteWatchdog(final Builder builder) { this.killedProcess = false; @@ -172,7 +172,7 @@ /** * Creates a new watchdog with a given timeout. * - * @param timeoutMillis the timeout for the process in milliseconds. It must be greater than 0 or {@code INFINITE_TIMEOUT}. + * @param timeoutMillis The timeout for the process in milliseconds. It must be greater than 0 or {@code INFINITE_TIMEOUT}. * @deprecated Use {@link Builder#get()}. */ @Deprecated @@ -226,7 +226,7 @@ /** * Notification that starting the process failed. * - * @param e the offending exception. + * @param e The offending exception. */ public synchronized void failedToStart(final Exception e) { processStarted = true; @@ -269,7 +269,7 @@ /** * Watches the given process and terminates it, if it runs for too long. All information from the previous run are reset. * - * @param processToMonitor the process to monitor. It cannot be {@code null}. + * @param processToMonitor The process to monitor. It cannot be {@code null}. * @throws IllegalStateException if a process is still being monitored. */ public synchronized void start(final Process processToMonitor) {
diff --git a/src/main/java/org/apache/commons/exec/Executor.java b/src/main/java/org/apache/commons/exec/Executor.java index 5afd981..37f752c 100644 --- a/src/main/java/org/apache/commons/exec/Executor.java +++ b/src/main/java/org/apache/commons/exec/Executor.java
@@ -55,7 +55,7 @@ /** * Executes a command synchronously. The child process inherits all environment variables of the parent process. * - * @param command the command to execute. + * @param command The command to execute. * @return process exit value. * @throws ExecuteException execution of subprocess failed or the subprocess returned an exit value indicating a failure {@link Executor#setExitValue(int)}. * @throws IOException If an I/O error occurs. @@ -65,7 +65,7 @@ /** * Executes a command asynchronously. The child process inherits all environment variables of the parent process. Result provided to callback handler. * - * @param command the command to execute. + * @param command The command to execute. * @param handler capture process termination and exit code. * @throws ExecuteException execution of subprocess failed. * @throws IOException If an I/O error occurs. @@ -75,7 +75,7 @@ /** * Executes a command synchronously. * - * @param command the command to execute. + * @param command The command to execute. * @param environment The environment for the new process. If null, the environment of the current process is used. * @return process exit value. * @throws ExecuteException execution of subprocess failed or the subprocess returned an exit value indicating a failure {@link Executor#setExitValue(int)}. @@ -86,7 +86,7 @@ /** * Executes a command asynchronously. The child process inherits all environment variables of the parent process. Result provided to callback handler. * - * @param command the command to execute. + * @param command The command to execute. * @param environment The environment for the new process. If null, the environment of the current process is used. * @param handler capture process termination and exit code. * @throws ExecuteException execution of subprocess failed. @@ -136,7 +136,7 @@ * Tests whether {@code exitValue} signals a failure. If no exit values are set than the default conventions of the OS is used. e.g. most OS regard an exit * code of '0' as successful execution and everything else as failure. * - * @param exitValue the exit value (return code) to be checked. + * @param exitValue The exit value (return code) to be checked. * @return {@code true} if {@code exitValue} signals a failure. */ boolean isFailure(int exitValue); @@ -145,7 +145,7 @@ * Sets the {@code exitValue} of the process to be considered successful. If a different exit value is returned by the process then * {@link org.apache.commons.exec.Executor#execute(CommandLine)} will throw an {@link org.apache.commons.exec.ExecuteException}. * - * @param value the exit code representing successful execution. + * @param value The exit code representing successful execution. */ void setExitValue(int value); @@ -160,14 +160,14 @@ * If an undefined exit value is returned by the process then {@link org.apache.commons.exec.Executor#execute(CommandLine)} will throw an * {@link org.apache.commons.exec.ExecuteException}. * - * @param values a list of the exit codes. + * @param values A list of the exit codes. */ void setExitValues(int[] values); /** * Sets the handler for cleanup of started processes if the main process is going to terminate. * - * @param processDestroyer the ProcessDestroyer. + * @param processDestroyer The ProcessDestroyer. */ void setProcessDestroyer(ProcessDestroyer processDestroyer); @@ -175,21 +175,21 @@ * Sets a custom the StreamHandler used for providing input and retrieving the output. If you don't provide a proper stream handler the executed process * might block when writing to stdout and/or stderr (see {@link Process Process}). * - * @param streamHandler the stream handler. + * @param streamHandler The stream handler. */ void setStreamHandler(ExecuteStreamHandler streamHandler); /** * Sets the watchdog used to kill of processes running, typically, too long time. * - * @param watchDog the watchdog. + * @param watchDog The watchdog. */ void setWatchdog(ExecuteWatchdog watchDog); /** * Sets the working directory of the created process. The working directory must exist when you start the process. * - * @param dir the working directory. + * @param dir The working directory. */ void setWorkingDirectory(File dir);
diff --git a/src/main/java/org/apache/commons/exec/LogOutputStream.java b/src/main/java/org/apache/commons/exec/LogOutputStream.java index 54cd1fa..360af93 100644 --- a/src/main/java/org/apache/commons/exec/LogOutputStream.java +++ b/src/main/java/org/apache/commons/exec/LogOutputStream.java
@@ -139,7 +139,7 @@ /** * Logs a line to the log system of the user. * - * @param line the line to log. + * @param line The line to log. */ protected void processLine(final String line) { processLine(line, level); @@ -148,17 +148,17 @@ /** * Logs a line to the log system of the user. * - * @param line the line to log. - * @param logLevel the log level to use + * @param line The line to log. + * @param logLevel The log level to use */ protected abstract void processLine(String line, int logLevel); /** * Writes a block of characters to the output stream. * - * @param b the array containing the data. - * @param off the offset into the array where data starts. - * @param len the length of block. + * @param b The array containing the data. + * @param off The offset into the array where data starts. + * @param len The length of block. * @throws IOException if the data cannot be written into the stream. * @see OutputStream#write(byte[], int, int) */
diff --git a/src/main/java/org/apache/commons/exec/OS.java b/src/main/java/org/apache/commons/exec/OS.java index a45103c..7ef202a 100644 --- a/src/main/java/org/apache/commons/exec/OS.java +++ b/src/main/java/org/apache/commons/exec/OS.java
@@ -113,7 +113,7 @@ /** * Tests whether the OS on which commons-exec is executing matches the given OS architecture. * - * @param arch the OS architecture to check for. + * @param arch The OS architecture to check for. * @return whether if the OS matches. */ public static boolean isArch(final String arch) { @@ -123,7 +123,7 @@ /** * Tests whether the OS on which commons-exec is executing matches the given OS family. * - * @param family the family to check for. + * @param family The family to check for. * @return whether if the OS matches. */ private static boolean isFamily(final String family) { @@ -241,7 +241,7 @@ /** * Tests whether if the OS on which commons-exec is executing matches the given OS name. * - * @param name the OS name to check for. + * @param name The OS name to check for. * @return whether the OS matches. */ public static boolean isName(final String name) { @@ -336,7 +336,7 @@ /** * Tests whether the OS on which commons-exec is executing matches the given OS version. * - * @param version the OS version to check for. + * @param version The OS version to check for. * @return whether if the OS matches. */ public static boolean isVersion(final String version) {
diff --git a/src/main/java/org/apache/commons/exec/ProcessDestroyer.java b/src/main/java/org/apache/commons/exec/ProcessDestroyer.java index d803bb2..ee4d9a6 100644 --- a/src/main/java/org/apache/commons/exec/ProcessDestroyer.java +++ b/src/main/java/org/apache/commons/exec/ProcessDestroyer.java
@@ -29,7 +29,7 @@ /** * Returns {@code true} if the specified {@link Process} was successfully added to the list of processes to be destroyed. * - * @param process the process to add. + * @param process The process to add. * @return {@code true} if the specified {@link Process} was successfully added. */ boolean add(Process process); @@ -37,7 +37,7 @@ /** * Returns {@code true} if the specified {@link Process} was successfully removed from the list of processes to be destroyed. * - * @param process the process to remove. + * @param process The process to remove. * @return {@code true} if the specified {@link Process} was successfully removed. */ boolean remove(Process process);
diff --git a/src/main/java/org/apache/commons/exec/PumpStreamHandler.java b/src/main/java/org/apache/commons/exec/PumpStreamHandler.java index 08d024a..6671f9d 100644 --- a/src/main/java/org/apache/commons/exec/PumpStreamHandler.java +++ b/src/main/java/org/apache/commons/exec/PumpStreamHandler.java
@@ -85,7 +85,7 @@ /** * Constructs a new {@link PumpStreamHandler}. * - * @param allOutputStream the output/error {@link OutputStream}. The {@code OutputStream} + * @param allOutputStream The output/error {@link OutputStream}. The {@code OutputStream} * implementation must be thread-safe because the output and error reader threads will * concurrently write to it. */ @@ -99,8 +99,8 @@ * <p>If the same {@link OutputStream} instance is used for output and error, then it must be * thread-safe because the output and error reader threads will concurrently write to it. * - * @param outputStream the output {@link OutputStream}. - * @param errorOutputStream the error {@link OutputStream}. + * @param outputStream The output {@link OutputStream}. + * @param errorOutputStream The error {@link OutputStream}. */ public PumpStreamHandler(final OutputStream outputStream, final OutputStream errorOutputStream) { this(outputStream, errorOutputStream, null); @@ -112,9 +112,9 @@ * <p>If the same {@link OutputStream} instance is used for output and error, then it must be * thread-safe because the output and error reader threads will concurrently write to it. * - * @param outputStream the output {@link OutputStream}. - * @param errorOutputStream the error {@link OutputStream}. - * @param inputStream the input {@link InputStream}. + * @param outputStream The output {@link OutputStream}. + * @param errorOutputStream The error {@link OutputStream}. + * @param inputStream The input {@link InputStream}. */ public PumpStreamHandler(final OutputStream outputStream, final OutputStream errorOutputStream, final InputStream inputStream) { this(Executors.defaultThreadFactory(), outputStream, errorOutputStream, inputStream); @@ -126,9 +126,9 @@ * <p>If the same {@link OutputStream} instance is used for output and error, then it must be * thread-safe because the output and error reader threads will concurrently write to it. * - * @param outputStream the output {@link OutputStream}. - * @param errorOutputStream the error {@link OutputStream}. - * @param inputStream the input {@link InputStream}. + * @param outputStream The output {@link OutputStream}. + * @param errorOutputStream The error {@link OutputStream}. + * @param inputStream The input {@link InputStream}. */ private PumpStreamHandler(final ThreadFactory threadFactory, final OutputStream outputStream, final OutputStream errorOutputStream, final InputStream inputStream) { @@ -141,8 +141,8 @@ /** * Create the pump to handle error output. * - * @param is the {@link InputStream}. - * @param os the {@link OutputStream}. + * @param is The {@link InputStream}. + * @param os The {@link OutputStream}. */ protected void createProcessErrorPump(final InputStream is, final OutputStream os) { errorThread = createPump(is, os); @@ -151,8 +151,8 @@ /** * Create the pump to handle process output. * - * @param is the {@link InputStream}. - * @param os the {@link OutputStream}. + * @param is The {@link InputStream}. + * @param os The {@link OutputStream}. */ protected void createProcessOutputPump(final InputStream is, final OutputStream os) { outputThread = createPump(is, os); @@ -162,8 +162,8 @@ * Creates a stream pumper to copy the given input stream to the given output stream. When the 'os' is an PipedOutputStream we are closing 'os' afterward * to avoid an IOException ("Write end dead"). * - * @param is the input stream to copy from. - * @param os the output stream to copy into. + * @param is The input stream to copy from. + * @param os The output stream to copy into. * @return The stream pumper thread. */ protected Thread createPump(final InputStream is, final OutputStream os) { @@ -173,8 +173,8 @@ /** * Creates a stream pumper to copy the given input stream to the given output stream. * - * @param is the input stream to copy from. - * @param os the output stream to copy into. + * @param is The input stream to copy from. + * @param os The output stream to copy into. * @param closeWhenExhausted close the output stream when the input stream is exhausted. * @return The stream pumper thread. */ @@ -185,8 +185,8 @@ /** * Creates a stream pumper to copy the given input stream to the given output stream. * - * @param is the System.in input stream to copy from. - * @param os the output stream to copy into. + * @param is The System.in input stream to copy from. + * @param os The output stream to copy into. * @return The stream pumper thread. */ private Thread createSystemInPump(final InputStream is, final OutputStream os) { @@ -219,7 +219,7 @@ /** * Sets the {@link InputStream} from which to read the standard error of the process. * - * @param is the {@link InputStream}. + * @param is The {@link InputStream}. */ @Override public void setProcessErrorStream(final InputStream is) { @@ -231,7 +231,7 @@ /** * Sets the {@link OutputStream} by means of which input can be sent to the process. * - * @param os the {@link OutputStream}. + * @param os The {@link OutputStream}. */ @Override public void setProcessInputStream(final OutputStream os) { @@ -254,7 +254,7 @@ /** * Sets the {@link InputStream} from which to read the standard output of the process. * - * @param is the {@link InputStream}. + * @param is The {@link InputStream}. */ @Override public void setProcessOutputStream(final InputStream is) { @@ -342,8 +342,8 @@ * Stops a pumper thread. The implementation actually waits longer than specified in 'timeout' to detect if the timeout was indeed exceeded. If the timeout * was exceeded an IOException is created to be thrown to the caller. * - * @param thread the thread to be stopped. - * @param timeout the time in ms to wait to join. + * @param thread The thread to be stopped. + * @param timeout The time in ms to wait to join. */ private void stop(final Thread thread, final Duration timeout) { if (thread != null) { @@ -368,8 +368,8 @@ * Stops a pumper thread. The implementation actually waits longer than specified in 'timeout' to detect if the timeout was indeed exceeded. If the timeout * was exceeded an IOException is created to be thrown to the caller. * - * @param thread the thread to be stopped. - * @param timeoutMillis the time in ms to wait to join. + * @param thread The thread to be stopped. + * @param timeoutMillis The time in ms to wait to join. */ protected void stopThread(final Thread thread, final long timeoutMillis) { stop(thread, Duration.ofMillis(timeoutMillis));
diff --git a/src/main/java/org/apache/commons/exec/ShutdownHookProcessDestroyer.java b/src/main/java/org/apache/commons/exec/ShutdownHookProcessDestroyer.java index 3475ca5..5108261 100644 --- a/src/main/java/org/apache/commons/exec/ShutdownHookProcessDestroyer.java +++ b/src/main/java/org/apache/commons/exec/ShutdownHookProcessDestroyer.java
@@ -77,7 +77,7 @@ /** * Returns {@code true} if the specified {@code Process} was successfully added to the list of processes to destroy upon VM exit. * - * @param process the process to add. + * @param process The process to add. * @return {@code true} if the specified {@code Process} was successfully added. */ @Override @@ -125,7 +125,7 @@ /** * Returns {@code true} if the specified {@code Process} was successfully removed from the list of processes to destroy upon VM exit. * - * @param process the process to remove. + * @param process The process to remove. * @return {@code true} if the specified {@code Process} was successfully removed. */ @Override
diff --git a/src/main/java/org/apache/commons/exec/StreamPumper.java b/src/main/java/org/apache/commons/exec/StreamPumper.java index 10d4cd3..475d552 100644 --- a/src/main/java/org/apache/commons/exec/StreamPumper.java +++ b/src/main/java/org/apache/commons/exec/StreamPumper.java
@@ -78,7 +78,7 @@ * @param is input stream to read data from. * @param os output stream to write data to. * @param closeWhenExhausted if true, the output stream will be closed when the input is exhausted. - * @param size the size of the internal buffer for copying the streams. + * @param size The size of the internal buffer for copying the streams. */ public StreamPumper(final InputStream is, final OutputStream os, final boolean closeWhenExhausted, final int size) { this.is = is;
diff --git a/src/main/java/org/apache/commons/exec/ThreadUtil.java b/src/main/java/org/apache/commons/exec/ThreadUtil.java index 6f9527a..45881cb 100644 --- a/src/main/java/org/apache/commons/exec/ThreadUtil.java +++ b/src/main/java/org/apache/commons/exec/ThreadUtil.java
@@ -29,9 +29,9 @@ /** * Creates a new Thread from the given factory and prefixes it's name with a prefix and sets the daemon flag. * - * @param threadFactory the thread factory. + * @param threadFactory The thread factory. * @param runnable The runnable to thread. - * @param prefix the thread name prefix + * @param prefix The thread name prefix * @param daemon marks this thread as a daemon thread * @return constructed thread, or {@code null} if the request to create a thread is rejected */
diff --git a/src/main/java/org/apache/commons/exec/TimeoutObserver.java b/src/main/java/org/apache/commons/exec/TimeoutObserver.java index 06634a7..2454e27 100644 --- a/src/main/java/org/apache/commons/exec/TimeoutObserver.java +++ b/src/main/java/org/apache/commons/exec/TimeoutObserver.java
@@ -41,7 +41,7 @@ /** * Called when the watchdog times out. * - * @param w the watchdog that timed out. + * @param w The watchdog that timed out. */ void timeoutOccured(Watchdog w); }
diff --git a/src/main/java/org/apache/commons/exec/Watchdog.java b/src/main/java/org/apache/commons/exec/Watchdog.java index aa6575b..45a382c 100644 --- a/src/main/java/org/apache/commons/exec/Watchdog.java +++ b/src/main/java/org/apache/commons/exec/Watchdog.java
@@ -73,7 +73,7 @@ /** * Sets the thread factory. * - * @param threadFactory the thread factory, null resets to the default {@link Executors#defaultThreadFactory()}. + * @param threadFactory The thread factory, null resets to the default {@link Executors#defaultThreadFactory()}. * @return {@code this} instance. */ public Builder setThreadFactory(final ThreadFactory threadFactory) { @@ -84,7 +84,7 @@ /** * Sets the timeout duration. * - * @param timeout the timeout duration, null resets to the default 30 seconds timeout. + * @param timeout The timeout duration, null resets to the default 30 seconds timeout. * @return {@code this} instance. */ public Builder setTimeout(final Duration timeout) { @@ -127,8 +127,8 @@ /** * Constructs a new instance. * - * @param threadFactory the thread factory. - * @param timeout the timeout duration. + * @param threadFactory The thread factory. + * @param timeout The timeout duration. */ private Watchdog(final Builder builder) { if (builder.timeout.isNegative() || Duration.ZERO.equals(builder.timeout)) { @@ -141,7 +141,7 @@ /** * Constructs a new instance. * - * @param timeoutMillis the timeout duration. + * @param timeoutMillis The timeout duration. * @deprecated Use {@link Builder#get()}. */ @Deprecated @@ -152,7 +152,7 @@ /** * Adds a TimeoutObserver. * - * @param to a TimeoutObserver to add. + * @param to A TimeoutObserver to add. */ public void addTimeoutObserver(final TimeoutObserver to) { observers.add(to); @@ -187,7 +187,7 @@ /** * Removes a TimeoutObserver. * - * @param to a TimeoutObserver to remove. + * @param to A TimeoutObserver to remove. */ public void removeTimeoutObserver(final TimeoutObserver to) { observers.remove(to);
diff --git a/src/main/java/org/apache/commons/exec/environment/EnvironmentUtils.java b/src/main/java/org/apache/commons/exec/environment/EnvironmentUtils.java index 1425179..49cf066 100644 --- a/src/main/java/org/apache/commons/exec/environment/EnvironmentUtils.java +++ b/src/main/java/org/apache/commons/exec/environment/EnvironmentUtils.java
@@ -40,8 +40,8 @@ /** * Adds a key/value pair to the given environment. If the key matches an existing key, the previous setting is replaced. * - * @param environment the current environment. - * @param keyAndValue the key/value pair. + * @param environment The current environment. + * @param keyAndValue The key/value pair. */ public static void addVariableToEnvironment(final Map<String, String> environment, final String keyAndValue) { final String[] parsedVariable = parseEnvironmentVariable(keyAndValue); @@ -62,7 +62,7 @@ /** * Parses a key/value pair into a String[]. It is assumed that the ky/value pair contains a '=' character. * - * @param keyAndValue the key/value pair. + * @param keyAndValue The key/value pair. * @return A String[] containing the key and value. */ private static String[] parseEnvironmentVariable(final String keyAndValue) { @@ -83,7 +83,7 @@ /** * Converts a variable map as an array. * - * @param environment the environment to use, may be {@code null}. + * @param environment The environment to use, may be {@code null}. * @return array of key=value assignment strings or {@code null} if and only if the input map was {@code null}. */ public static String[] toStrings(final Map<String, String> environment) {
diff --git a/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java b/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java index 9c96c25..8f1dc5c 100644 --- a/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java +++ b/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java
@@ -80,8 +80,8 @@ // * symbols from {@code in} and adds them to {@code environment}. // * {@code in} is expected to be the output of "SHOW SYMBOL/GLOBAL *". // * -// * @param environment the current environment -// * @param in the reader from the process to determine VMS env variables +// * @param environment The current environment +// * @param in The reader from the process to determine VMS env variables // * @return The updated environment // * @throws IOException operation failed // */
diff --git a/src/main/java/org/apache/commons/exec/launcher/CommandLauncher.java b/src/main/java/org/apache/commons/exec/launcher/CommandLauncher.java index a814b3c..a229f4e 100644 --- a/src/main/java/org/apache/commons/exec/launcher/CommandLauncher.java +++ b/src/main/java/org/apache/commons/exec/launcher/CommandLauncher.java
@@ -74,7 +74,7 @@ * but this signals a failure on OpenVMS. So if you execute a new Java VM on OpenVMS, you cannot trust this method. * </p> * - * @param exitValue the exit value (return code) to be checked. + * @param exitValue The exit value (return code) to be checked. * @return {@code true} if {@code exitValue} signals a failure. */ boolean isFailure(int exitValue);
diff --git a/src/main/java/org/apache/commons/exec/launcher/CommandLauncherProxy.java b/src/main/java/org/apache/commons/exec/launcher/CommandLauncherProxy.java index 3287efd..6fc07e4 100644 --- a/src/main/java/org/apache/commons/exec/launcher/CommandLauncherProxy.java +++ b/src/main/java/org/apache/commons/exec/launcher/CommandLauncherProxy.java
@@ -35,7 +35,7 @@ /** * Constructs a new instance. * - * @param launcher the command launcher to use. + * @param launcher The command launcher to use. */ public CommandLauncherProxy(final CommandLauncher launcher) { this.launcher = launcher; @@ -44,8 +44,8 @@ /** * Launches the given command in a new process. Delegates this method to the proxied launcher. * - * @param cmd the command line to execute as an array of strings. - * @param env the environment to set as an array of strings. + * @param cmd The command line to execute as an array of strings. + * @param env The environment to set as an array of strings. * @throws IOException forwarded from the exec method of the command launcher. */ @Override
diff --git a/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java b/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java index 0e477c9..83402ef 100644 --- a/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java +++ b/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java
@@ -40,9 +40,9 @@ /** * Launches the given command in a new process, in the given working directory. * - * @param cmd the command line to execute as an array of strings. - * @param env the environment to set as an array of strings. - * @param workingDir the working directory where the command should run. + * @param cmd The command line to execute as an array of strings. + * @param env The environment to set as an array of strings. + * @param workingDir The working directory where the command should run. * @throws IOException probably forwarded from {@link Runtime#exec(String[], String[], File)}. */ @Override
diff --git a/src/main/java/org/apache/commons/exec/launcher/OS2CommandLauncher.java b/src/main/java/org/apache/commons/exec/launcher/OS2CommandLauncher.java index 0239666..79095dd 100644 --- a/src/main/java/org/apache/commons/exec/launcher/OS2CommandLauncher.java +++ b/src/main/java/org/apache/commons/exec/launcher/OS2CommandLauncher.java
@@ -39,7 +39,7 @@ /** * Constructs a new instance. * - * @param launcher the command launcher to use. + * @param launcher The command launcher to use. */ public OS2CommandLauncher(final CommandLauncher launcher) { super(launcher); @@ -48,8 +48,8 @@ /** * Launches the given command in a new process, in the given working directory. * - * @param cmd the command line to execute as an array of strings. - * @param env the environment to set as an array of strings. + * @param cmd The command line to execute as an array of strings. + * @param env The environment to set as an array of strings. * @param workingDir working directory where the command should run. * @throws IOException forwarded from the exec method of the command launcher. */
diff --git a/src/main/java/org/apache/commons/exec/launcher/WinNTCommandLauncher.java b/src/main/java/org/apache/commons/exec/launcher/WinNTCommandLauncher.java index be6dfa2..605d9cb 100644 --- a/src/main/java/org/apache/commons/exec/launcher/WinNTCommandLauncher.java +++ b/src/main/java/org/apache/commons/exec/launcher/WinNTCommandLauncher.java
@@ -33,7 +33,7 @@ /** * Constructs a new instance. * - * @param launcher the command launcher to use. + * @param launcher The command launcher to use. */ public WinNTCommandLauncher(final CommandLauncher launcher) { super(launcher); @@ -42,8 +42,8 @@ /** * Launches the given command in a new process, in the given working directory. * - * @param cmd the command line to execute as an array of strings. - * @param env the environment to set as an array of strings. + * @param cmd The command line to execute as an array of strings. + * @param env The environment to set as an array of strings. * @param workingDir working directory where the command should run. * @throws IOException forwarded from the exec method of the command launcher. */
diff --git a/src/main/java/org/apache/commons/exec/util/DebugUtils.java b/src/main/java/org/apache/commons/exec/util/DebugUtils.java index 84ce592..efe3f2c 100644 --- a/src/main/java/org/apache/commons/exec/util/DebugUtils.java +++ b/src/main/java/org/apache/commons/exec/util/DebugUtils.java
@@ -39,7 +39,7 @@ * Handles an exception based on the system properties. * * @param msg message describing the problem. - * @param e an exception being handled. + * @param e An exception being handled. */ public static void handleException(final String msg, final Exception e) { if (isDebugEnabled()) {
diff --git a/src/main/java/org/apache/commons/exec/util/MapUtils.java b/src/main/java/org/apache/commons/exec/util/MapUtils.java index b82b900..f7356cc 100644 --- a/src/main/java/org/apache/commons/exec/util/MapUtils.java +++ b/src/main/java/org/apache/commons/exec/util/MapUtils.java
@@ -31,7 +31,7 @@ /** * Clones a map. * - * @param source the Map to clone. + * @param source The Map to clone. * @param <K> the map key type. * @param <V> the map value type. * @return The cloned map. @@ -43,8 +43,8 @@ /** * Clones the lhs map and add all things from the rhs map. * - * @param lhs the first map. - * @param rhs the second map. + * @param lhs The first map. + * @param rhs The second map. * @param <K> The map key type. * @param <V> The map value type. * @return The merged map. @@ -65,8 +65,8 @@ /** * Clones a map and prefixes the keys in the clone, e.g. for mapping "JAVA_HOME" to "env.JAVA_HOME" to simulate the behavior of Ant. * - * @param source the source map. - * @param prefix the prefix used for all names. + * @param source The source map. + * @param prefix The prefix used for all names. * @param <K> the map key type. * @param <V> the map value type. * @return The clone of the source map.
diff --git a/src/main/java/org/apache/commons/exec/util/StringUtils.java b/src/main/java/org/apache/commons/exec/util/StringUtils.java index dfef5e6..3de578d 100644 --- a/src/main/java/org/apache/commons/exec/util/StringUtils.java +++ b/src/main/java/org/apache/commons/exec/util/StringUtils.java
@@ -55,7 +55,7 @@ * <li>'\\' → File.separatorChar</li> * </ul> * - * @param arg the argument to fix. + * @param arg The argument to fix. * @return The transformed argument. */ public static String fixFileSeparatorChar(final String arg) { @@ -65,7 +65,7 @@ /** * Determines if this is a quoted argument - either single or double-quoted. * - * @param argument the argument to check. + * @param argument The argument to check. * @return true when the argument is quoted. */ public static boolean isQuoted(final String argument) { @@ -79,7 +79,7 @@ * quotes. * </p> * - * @param argument the argument to be quoted. + * @param argument The argument to be quoted. * @return The quoted argument. * @throws IllegalArgumentException If argument contains both types of quotes. */ @@ -143,7 +143,7 @@ * <li>underscore character</li> * </ul> * - * @param argStr the argument string to be processed. + * @param argStr The argument string to be processed. * @param vars name/value pairs used for substitution. * @param isLenient ignore a key not found in vars or throw a RuntimeException? * @return String target string with replacements. @@ -233,8 +233,8 @@ /** * Concatenates an array of string using a separator. * - * @param strings the strings to concatenate. - * @param separator the separator between two strings. + * @param strings The strings to concatenate. + * @param separator The separator between two strings. * @return The concatenated strings. * @deprecated Use {@link String#join(CharSequence, CharSequence...)}. */
diff --git a/src/test/java/org/apache/commons/exec/TutorialTest.java b/src/test/java/org/apache/commons/exec/TutorialTest.java index f87d868..b614ad8 100644 --- a/src/test/java/org/apache/commons/exec/TutorialTest.java +++ b/src/test/java/org/apache/commons/exec/TutorialTest.java
@@ -79,8 +79,8 @@ /** * Simulate printing a PDF document. * - * @param file the file to print - * @param printJobTimeout the printJobTimeout (ms) before the watchdog terminates the print process + * @param file The file to print + * @param printJobTimeout The printJobTimeout (ms) before the watchdog terminates the print process * @param printInBackground printing done in the background or blocking * @return A print result handler (implementing a future) * @throws IOException the test failed