From 2a8ce4a11cf42683d7abf06c591b4c0f1e8928e1 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Sat, 13 Oct 2012 18:56:57 +0000 Subject: [PATCH] Rename method from "is" prefix to "read" prefix because it is not just a test method, it may actually consume input. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397923 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/commons/csv/CSVLexer.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/apache/commons/csv/CSVLexer.java b/src/main/java/org/apache/commons/csv/CSVLexer.java index 6a8f41b1..57574e3b 100644 --- a/src/main/java/org/apache/commons/csv/CSVLexer.java +++ b/src/main/java/org/apache/commons/csv/CSVLexer.java @@ -55,7 +55,7 @@ final class CSVLexer extends Lexer { * Note: The following call will swallow LF if c == CR. But we don't need to know if the last char was CR or LF * - they are equivalent here. */ - boolean eol = isEndOfLine(c); + boolean eol = readEndOfLine(c); // empty line detection: eol AND (last char was EOL or beginning) if (ignoreEmptyLines) { @@ -63,7 +63,7 @@ final class CSVLexer extends Lexer { // go on char ahead ... lastChar = c; c = in.read(); - eol = isEndOfLine(c); + eol = readEndOfLine(c); // reached end of file without any content (empty line at the end) if (isEndOfFile(c)) { token.type = EOF; @@ -93,7 +93,7 @@ final class CSVLexer extends Lexer { if (ignoreSurroundingSpaces) { while (isWhitespace(c) && !eol) { c = in.read(); - eol = isEndOfLine(c); + eol = readEndOfLine(c); } } @@ -144,7 +144,7 @@ final class CSVLexer extends Lexer { private Token simpleTokenLexer(final Token tkn, int c) throws IOException { // Faster to use while(true)+break than while(tkn.type == INVALID) while (true) { - if (isEndOfLine(c)) { + if (readEndOfLine(c)) { tkn.type = EORECORD; break; } else if (isEndOfFile(c)) { @@ -215,7 +215,7 @@ final class CSVLexer extends Lexer { tkn.type = EOF; tkn.isReady = true; // There is data at EOF return tkn; - } else if (isEndOfLine(c)) { + } else if (readEndOfLine(c)) { tkn.type = EORECORD; return tkn; } else if (!isWhitespace(c)) {