commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1306073 - /commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java
Date Wed, 28 Mar 2012 00:22:26 GMT
Author: sebb
Date: Wed Mar 28 00:22:25 2012
New Revision: 1306073

URL: http://svn.apache.org/viewvc?rev=1306073&view=rev
Log:
lastChar cannot possibly be EOF if it is CR, LF or UNDEFINED

Modified:
    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java

Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java?rev=1306073&r1=1306072&r2=1306073&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java (original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java Wed Mar 28
00:22:25 2012
@@ -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();



Mime
View raw message