Skip to content

Commit c7576cc

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@1397924 13f79535-47bb-0310-9956-ffa450edef68
1 parent 2a8ce4a commit c7576cc

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/test/java/org/apache/commons/csv/CSVLexer1.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Token nextToken(Token tkn) throws IOException {
5555
* is to call 'readAgain' on the stream...
5656
*/
5757
int c = in.read();
58-
boolean eol = isEndOfLine(c);
58+
boolean eol = readEndOfLine(c);
5959
c = in.getLastChar();
6060

6161
// empty line detection: eol AND (last char was EOL or beginning)
@@ -66,7 +66,7 @@ Token nextToken(Token tkn) throws IOException {
6666
// go on char ahead ...
6767
lastChar = c;
6868
c = in.read();
69-
eol = isEndOfLine(c);
69+
eol = readEndOfLine(c);
7070
c = in.getLastChar();
7171
// reached end of file without any content (empty line at the end)
7272
if (isEndOfFile(c)) {
@@ -89,7 +89,7 @@ Token nextToken(Token tkn) throws IOException {
8989
while (isWhitespace(c) && !eol) {
9090
wsBuf.append((char) c);
9191
c = in.read();
92-
eol = isEndOfLine(c);
92+
eol = readEndOfLine(c);
9393
}
9494
}
9595

@@ -147,7 +147,7 @@ Token nextToken(Token tkn) throws IOException {
147147
*/
148148
private Token simpleTokenLexer(final Token tkn, int c) throws IOException {
149149
while (true) {
150-
if (isEndOfLine(c)) {
150+
if (readEndOfLine(c)) {
151151
// end of record
152152
tkn.type = EORECORD;
153153
tkn.isReady = true;
@@ -218,7 +218,7 @@ private Token encapsulatedTokenLexer(final Token tkn, int c) throws IOException
218218
tkn.type = EOF;
219219
tkn.isReady = true;
220220
return tkn;
221-
} else if (isEndOfLine(c)) {
221+
} else if (readEndOfLine(c)) {
222222
// ok eo token reached
223223
tkn.type = EORECORD;
224224
tkn.isReady = true;

src/test/java/org/apache/commons/csv/CSVLexer1306663.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Token nextToken(final Token tkn) throws IOException {
6060
* this has no effect outside of the method. so a simple workaround
6161
* is to call 'readAgain' on the stream...
6262
*/
63-
boolean eol = isEndOfLine(c);
63+
boolean eol = readEndOfLine(c);
6464
c = in.getLastChar();
6565

6666
// empty line detection: eol AND (last char was EOL or beginning)
@@ -69,7 +69,7 @@ Token nextToken(final Token tkn) throws IOException {
6969
// go on char ahead ...
7070
lastChar = c;
7171
c = in.read();
72-
eol = isEndOfLine(c);
72+
eol = readEndOfLine(c);
7373
c = in.getLastChar();
7474
// reached end of file without any content (empty line at the end)
7575
if (isEndOfFile(c)) {
@@ -93,7 +93,7 @@ Token nextToken(final Token tkn) 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

@@ -142,7 +142,7 @@ Token nextToken(final Token tkn) throws IOException {
142142
private Token simpleTokenLexer(final Token tkn, int c) throws IOException {
143143
// Faster to use while(true)+break than while(tkn.type == INVALID)
144144
while (true) {
145-
if (isEndOfLine(c)) {
145+
if (readEndOfLine(c)) {
146146
tkn.type = EORECORD;
147147
break;
148148
} else if (isEndOfFile(c)) {
@@ -207,7 +207,7 @@ private Token encapsulatedTokenLexer(final Token tkn) throws IOException {
207207
tkn.type = EOF;
208208
tkn.isReady = true; // There is data at EOF
209209
return tkn;
210-
} else if (isEndOfLine(c)) {
210+
} else if (readEndOfLine(c)) {
211211
// ok eo token reached
212212
tkn.type = EORECORD;
213213
return tkn;

src/test/java/org/apache/commons/csv/CSVLexer1306667.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Token nextToken(final Token tkn) throws IOException {
5454
* this has no effect outside of the method. so a simple workaround
5555
* is to call 'readAgain' on the stream...
5656
*/
57-
boolean eol = isEndOfLine(c);
57+
boolean eol = readEndOfLine(c);
5858
c = in.getLastChar();
5959

6060
// empty line detection: eol AND (last char was EOL or beginning)
@@ -63,7 +63,7 @@ Token nextToken(final Token tkn) throws IOException {
6363
// go on char ahead ...
6464
lastChar = c;
6565
c = in.read();
66-
eol = isEndOfLine(c);
66+
eol = readEndOfLine(c);
6767
c = in.getLastChar();
6868
// reached end of file without any content (empty line at the end)
6969
if (isEndOfFile(c)) {
@@ -93,7 +93,7 @@ Token nextToken(final Token tkn) 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

@@ -142,7 +142,7 @@ Token nextToken(final Token tkn) throws IOException {
142142
private Token simpleTokenLexer(final Token tkn, int c) throws IOException {
143143
// Faster to use while(true)+break than while(tkn.type == INVALID)
144144
while (true) {
145-
if (isEndOfLine(c)) {
145+
if (readEndOfLine(c)) {
146146
tkn.type = EORECORD;
147147
break;
148148
} else if (isEndOfFile(c)) {
@@ -207,7 +207,7 @@ private Token encapsulatedTokenLexer(final Token tkn) throws IOException {
207207
tkn.type = EOF;
208208
tkn.isReady = true; // There is data at EOF
209209
return tkn;
210-
} else if (isEndOfLine(c)) {
210+
} else if (readEndOfLine(c)) {
211211
// ok eo token reached
212212
tkn.type = EORECORD;
213213
return tkn;

0 commit comments

Comments
 (0)