Skip to content

Commit 2a8ce4a

Browse files
committed
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
1 parent 0f8cc22 commit 2a8ce4a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/org/apache/commons/csv/CSVLexer.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ Token nextToken(final Token token) throws IOException {
5555
* 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
5656
* - they are equivalent here.
5757
*/
58-
boolean eol = isEndOfLine(c);
58+
boolean eol = readEndOfLine(c);
5959

6060
// empty line detection: eol AND (last char was EOL or beginning)
6161
if (ignoreEmptyLines) {
6262
while (eol && isStartOfLine(lastChar)) {
6363
// go on char ahead ...
6464
lastChar = c;
6565
c = in.read();
66-
eol = isEndOfLine(c);
66+
eol = readEndOfLine(c);
6767
// reached end of file without any content (empty line at the end)
6868
if (isEndOfFile(c)) {
6969
token.type = EOF;
@@ -93,7 +93,7 @@ Token nextToken(final Token token) throws IOException {
9393
if (ignoreSurroundingSpaces) {
9494
while (isWhitespace(c) && !eol) {
9595
c = in.read();
96-
eol = isEndOfLine(c);
96+
eol = readEndOfLine(c);
9797
}
9898
}
9999

@@ -144,7 +144,7 @@ Token nextToken(final Token token) throws IOException {
144144
private Token simpleTokenLexer(final Token tkn, int c) throws IOException {
145145
// Faster to use while(true)+break than while(tkn.type == INVALID)
146146
while (true) {
147-
if (isEndOfLine(c)) {
147+
if (readEndOfLine(c)) {
148148
tkn.type = EORECORD;
149149
break;
150150
} else if (isEndOfFile(c)) {
@@ -215,7 +215,7 @@ private Token encapsulatedTokenLexer(final Token tkn) throws IOException {
215215
tkn.type = EOF;
216216
tkn.isReady = true; // There is data at EOF
217217
return tkn;
218-
} else if (isEndOfLine(c)) {
218+
} else if (readEndOfLine(c)) {
219219
tkn.type = EORECORD;
220220
return tkn;
221221
} else if (!isWhitespace(c)) {

0 commit comments

Comments
 (0)