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-csv.git
The following commit(s) were added to refs/heads/master by this push: new c6c7676 Add PMD check to default goal and fix only 2 remaining PMD warnings. c6c7676 is described below commit c6c7676b56040c8bc20ed7ef7a2a2cae55341988 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Jul 5 16:38:52 2021 -0400 Add PMD check to default goal and fix only 2 remaining PMD warnings. --- pom.xml | 2 +- src/main/java/org/apache/commons/csv/ExtendedBufferedReader.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 8e9c455..4770acf 100644 --- a/pom.xml +++ b/pom.xml @@ -184,7 +184,7 @@ </properties> <build> - <defaultGoal>clean package apache-rat:check japicmp:cmp checkstyle:check spotbugs:check javadoc:javadoc</defaultGoal> + <defaultGoal>clean package apache-rat:check japicmp:cmp checkstyle:check spotbugs:check pmd:check javadoc:javadoc</defaultGoal> <pluginManagement> <plugins> <plugin> diff --git a/src/main/java/org/apache/commons/csv/ExtendedBufferedReader.java b/src/main/java/org/apache/commons/csv/ExtendedBufferedReader.java index 9a7243d..d76464b 100644 --- a/src/main/java/org/apache/commons/csv/ExtendedBufferedReader.java +++ b/src/main/java/org/apache/commons/csv/ExtendedBufferedReader.java @@ -142,8 +142,8 @@ final class ExtendedBufferedReader extends BufferedReader { @Override public int read() throws IOException { final int current = super.read(); - if ((current == CR || current == LF && lastChar != CR) || - (current == END_OF_STREAM && lastChar != CR && lastChar != LF && lastChar != END_OF_STREAM)) { + if (current == CR || current == LF && lastChar != CR || + current == END_OF_STREAM && lastChar != CR && lastChar != LF && lastChar != END_OF_STREAM) { eolCounter++; } lastChar = current;