diff --git a/src/main/java/org/apache/commons/csv/ExtendedBufferedReader.java b/src/main/java/org/apache/commons/csv/ExtendedBufferedReader.java index 6454d5de..603f5207 100644 --- a/src/main/java/org/apache/commons/csv/ExtendedBufferedReader.java +++ b/src/main/java/org/apache/commons/csv/ExtendedBufferedReader.java @@ -58,7 +58,7 @@ final class ExtendedBufferedReader extends BufferedReader { @Override public int read() throws IOException { final int current = super.read(); - if (current == CR || (current == LF && lastChar != CR)) { + if (current == CR || current == LF && lastChar != CR) { eolCounter++; } lastChar = current; diff --git a/src/main/java/org/apache/commons/csv/Lexer.java b/src/main/java/org/apache/commons/csv/Lexer.java index 8a84bd5a..0329c356 100644 --- a/src/main/java/org/apache/commons/csv/Lexer.java +++ b/src/main/java/org/apache/commons/csv/Lexer.java @@ -110,7 +110,7 @@ final class Lexer implements Closeable { } // did we reach eof during the last iteration already ? EOF - if (isEndOfFile(lastChar) || (!isDelimiter(lastChar) && isEndOfFile(c))) { + if (isEndOfFile(lastChar) || !isDelimiter(lastChar) && isEndOfFile(c)) { token.type = EOF; // don't set token.isReady here because no content return token;