sgoeschl commented on a change in pull request #60: Fix csv 149 195 URL: https://github.com/apache/commons-csv/pull/60#discussion_r383817594
########## File path: src/main/java/org/apache/commons/csv/ExtendedBufferedReader.java ########## @@ -92,7 +93,8 @@ public int read(final char[] buf, final int offset, final int length) throws IOE if (CR != (i > 0 ? buf[i - 1] : lastChar)) { eolCounter++; } - } else if (ch == CR) { + } else if ((ch == CR) + || (ch == END_OF_STREAM && (i > 0 ? buf[i - 1] : lastChar) != LF && (i > 0 ? buf[i - 1] : lastChar) != CR)) { Review comment: Can we make the code more self-explaining? * `i > 0 ? buf[i - 1`is used three times in this code snippet ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services