This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-exec.git
commit 06d751311395b592cfcc2b5241b6ec64f9cdb638 Author: Gary Gregory <[email protected]> AuthorDate: Sat Jun 22 14:59:02 2024 -0400 Fix PMD UnnecessaryFullyQualifiedName in DefaultExecutor --- src/changes/changes.xml | 1 + src/main/java/org/apache/commons/exec/DefaultExecutor.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 94604079..882c5144 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -30,6 +30,7 @@ <!-- FIX --> <action dev="ggregory" type="fix" issue="EXEC-122" due-to="Marcono1234">Document PumpStreamHandler stream thread-safety requirements.</action> <action dev="ggregory" type="fix" due-to="Marcono1234">Fix CI only running on Ubuntu & improve OS-specific tests #143.</action> + <action dev="ggregory" type="fix" due-to="Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in DefaultExecutor.</action> <!-- UPDATE --> <action dev="ggregory" type="update" due-to="Dependabot">Bump org.apache.commons:commons-parent from 65 to 69 #174.</action> </release> diff --git a/src/main/java/org/apache/commons/exec/DefaultExecutor.java b/src/main/java/org/apache/commons/exec/DefaultExecutor.java index 47ab8066..52dd6c32 100644 --- a/src/main/java/org/apache/commons/exec/DefaultExecutor.java +++ b/src/main/java/org/apache/commons/exec/DefaultExecutor.java @@ -264,7 +264,7 @@ public class DefaultExecutor implements Executor { watchdog.setProcessNotStarted(); } executorThread = createThread(() -> { - int exitValue = Executor.INVALID_EXITVALUE; + int exitValue = INVALID_EXITVALUE; try { exitValue = executeInternal(command, environment, workingDirectory, executeStreamHandler); handler.onProcessComplete(exitValue); @@ -318,7 +318,7 @@ public class DefaultExecutor implements Executor { if (watchdog != null) { watchdog.start(process); } - int exitValue = Executor.INVALID_EXITVALUE; + int exitValue = INVALID_EXITVALUE; try { exitValue = process.waitFor(); } catch (final InterruptedException e) {
