You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/08/24 15:15:07 UTC

[commons-exec] 07/07: Add PMD check to default Maven goal

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 ecf1ea9d58cc9b70bcf20af3d4bf544e1fe67586
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Aug 24 11:14:55 2022 -0400

    Add PMD check to default Maven goal
    
    Use PMD convention to call exception variable "ignored"
---
 pom.xml                                                 | 2 +-
 src/main/java/org/apache/commons/exec/StreamPumper.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 456a5f0..a6a5b61 100644
--- a/pom.xml
+++ b/pom.xml
@@ -120,7 +120,7 @@
 
     <build>
         <!-- TODO Add checkstyle:check -->
-        <defaultGoal>clean verify apache-rat:check japicmp:cmp pmd:cpd-check javadoc:javadoc</defaultGoal>     
+        <defaultGoal>clean verify apache-rat:check japicmp:cmp pmd:cpd-check pmd:check javadoc:javadoc</defaultGoal>     
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
diff --git a/src/main/java/org/apache/commons/exec/StreamPumper.java b/src/main/java/org/apache/commons/exec/StreamPumper.java
index 33621cb..ae7e52b 100644
--- a/src/main/java/org/apache/commons/exec/StreamPumper.java
+++ b/src/main/java/org/apache/commons/exec/StreamPumper.java
@@ -107,7 +107,7 @@ public class StreamPumper implements Runnable {
             while ((length = is.read(buf)) > 0) {
                 os.write(buf, 0, length);
             }
-        } catch (final Exception e) {
+        } catch (final Exception ignored) {
             // nothing to do - happens quite often with watchdog
         } finally {
             if (closeWhenExhausted) {