lastChar cannot possibly be EOF if it is CR, LF or UNDEFINED

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306073 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-03-28 00:22:25 +00:00
parent 0a0f3bbd36
commit 7c2cfeaf58

View File

@ -54,9 +54,7 @@ class CSVLexer extends Lexer {
// empty line detection: eol AND (last char was EOL or beginning)
if (emptyLinesIgnored) {
while (eol
&& (lastChar == '\n' || lastChar == '\r' || lastChar == ExtendedBufferedReader.UNDEFINED)
&& !isEndOfFile(lastChar)) {
while (eol && (lastChar == '\n' || lastChar == '\r' || lastChar == ExtendedBufferedReader.UNDEFINED)) {
// go on char ahead ...
lastChar = c;
c = in.read();