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/06/14 23:30:39 UTC

[commons-io] 03/03: Enable PMD check in the 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-io.git

commit 885c8a481882d41c685a363e8274adb007e411d9
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jun 14 19:30:28 2022 -0400

    Enable PMD check in the default Maven goal.
---
 pom.xml                                                                | 2 +-
 src/main/java/org/apache/commons/io/file/PathUtils.java                | 2 +-
 src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 083bc2d9..99ee6cfc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -357,7 +357,7 @@ file comparators, endian transformation classes, and much more.
 
   <build>
     <!-- japicmp:cmp needs package to work from a jar -->
-    <defaultGoal>clean verify apache-rat:check japicmp:cmp checkstyle:check javadoc:javadoc</defaultGoal>
+    <defaultGoal>clean verify apache-rat:check japicmp:cmp checkstyle:check pmd:check javadoc:javadoc</defaultGoal>
     <pluginManagement>
       <plugins>
         <plugin>
diff --git a/src/main/java/org/apache/commons/io/file/PathUtils.java b/src/main/java/org/apache/commons/io/file/PathUtils.java
index be9aae47..ae59c81d 100644
--- a/src/main/java/org/apache/commons/io/file/PathUtils.java
+++ b/src/main/java/org/apache/commons/io/file/PathUtils.java
@@ -721,7 +721,7 @@ public final class PathUtils {
             // same file
             return true;
         }
-        try (InputStream inputStream1 = Files.newInputStream(nPath1, openOptions); 
+        try (InputStream inputStream1 = Files.newInputStream(nPath1, openOptions);
             InputStream inputStream2 = Files.newInputStream(nPath2, openOptions)) {
             return IOUtils.contentEquals(inputStream1, inputStream2);
         }
diff --git a/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java b/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java
index 2f0dab8f..5d7e94c3 100644
--- a/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java
+++ b/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java
@@ -124,7 +124,7 @@ public class ReversedLinesFileReader implements Closeable {
          *
          * @return the line or null
          */
-        private String readLine() {
+        private String readLine() { //NOPMD Bug in PMD
 
             String line = null;
             int newLineMatchByteCount;