You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2012/10/13 20:57:09 UTC
svn commit: r1397924 - in
/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv:
CSVLexer1.java CSVLexer1306663.java CSVLexer1306667.java
Author: ggregory
Date: Sat Oct 13 18:57:09 2012
New Revision: 1397924
URL: http://svn.apache.org/viewvc?rev=1397924&view=rev
Log:
Rename method from "is" prefix to "read" prefix because it is not just a test method, it may actually consume input.
Modified:
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1.java
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306663.java
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306667.java
Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1.java?rev=1397924&r1=1397923&r2=1397924&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1.java Sat Oct 13 18:57:09 2012
@@ -55,7 +55,7 @@ class CSVLexer1 extends Lexer {
* is to call 'readAgain' on the stream...
*/
int c = in.read();
- boolean eol = isEndOfLine(c);
+ boolean eol = readEndOfLine(c);
c = in.getLastChar();
// empty line detection: eol AND (last char was EOL or beginning)
@@ -66,7 +66,7 @@ class CSVLexer1 extends Lexer {
// go on char ahead ...
lastChar = c;
c = in.read();
- eol = isEndOfLine(c);
+ eol = readEndOfLine(c);
c = in.getLastChar();
// reached end of file without any content (empty line at the end)
if (isEndOfFile(c)) {
@@ -89,7 +89,7 @@ class CSVLexer1 extends Lexer {
while (isWhitespace(c) && !eol) {
wsBuf.append((char) c);
c = in.read();
- eol = isEndOfLine(c);
+ eol = readEndOfLine(c);
}
}
@@ -147,7 +147,7 @@ class CSVLexer1 extends Lexer {
*/
private Token simpleTokenLexer(final Token tkn, int c) throws IOException {
while (true) {
- if (isEndOfLine(c)) {
+ if (readEndOfLine(c)) {
// end of record
tkn.type = EORECORD;
tkn.isReady = true;
@@ -218,7 +218,7 @@ class CSVLexer1 extends Lexer {
tkn.type = EOF;
tkn.isReady = true;
return tkn;
- } else if (isEndOfLine(c)) {
+ } else if (readEndOfLine(c)) {
// ok eo token reached
tkn.type = EORECORD;
tkn.isReady = true;
Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306663.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306663.java?rev=1397924&r1=1397923&r2=1397924&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306663.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306663.java Sat Oct 13 18:57:09 2012
@@ -60,7 +60,7 @@ class CSVLexer1306663 extends Lexer {
* this has no effect outside of the method. so a simple workaround
* is to call 'readAgain' on the stream...
*/
- boolean eol = isEndOfLine(c);
+ boolean eol = readEndOfLine(c);
c = in.getLastChar();
// empty line detection: eol AND (last char was EOL or beginning)
@@ -69,7 +69,7 @@ class CSVLexer1306663 extends Lexer {
// go on char ahead ...
lastChar = c;
c = in.read();
- eol = isEndOfLine(c);
+ eol = readEndOfLine(c);
c = in.getLastChar();
// reached end of file without any content (empty line at the end)
if (isEndOfFile(c)) {
@@ -93,7 +93,7 @@ class CSVLexer1306663 extends Lexer {
if (ignoreSurroundingSpaces) {
while (isWhitespace(c) && !eol) {
c = in.read();
- eol = isEndOfLine(c);
+ eol = readEndOfLine(c);
}
}
@@ -142,7 +142,7 @@ class CSVLexer1306663 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)) {
@@ -207,7 +207,7 @@ class CSVLexer1306663 extends Lexer {
tkn.type = EOF;
tkn.isReady = true; // There is data at EOF
return tkn;
- } else if (isEndOfLine(c)) {
+ } else if (readEndOfLine(c)) {
// ok eo token reached
tkn.type = EORECORD;
return tkn;
Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306667.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306667.java?rev=1397924&r1=1397923&r2=1397924&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306667.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306667.java Sat Oct 13 18:57:09 2012
@@ -54,7 +54,7 @@ class CSVLexer1306667 extends Lexer {
* this has no effect outside of the method. so a simple workaround
* is to call 'readAgain' on the stream...
*/
- boolean eol = isEndOfLine(c);
+ boolean eol = readEndOfLine(c);
c = in.getLastChar();
// empty line detection: eol AND (last char was EOL or beginning)
@@ -63,7 +63,7 @@ class CSVLexer1306667 extends Lexer {
// go on char ahead ...
lastChar = c;
c = in.read();
- eol = isEndOfLine(c);
+ eol = readEndOfLine(c);
c = in.getLastChar();
// reached end of file without any content (empty line at the end)
if (isEndOfFile(c)) {
@@ -93,7 +93,7 @@ class CSVLexer1306667 extends Lexer {
if (ignoreSurroundingSpaces) {
while (isWhitespace(c) && !eol) {
c = in.read();
- eol = isEndOfLine(c);
+ eol = readEndOfLine(c);
}
}
@@ -142,7 +142,7 @@ class CSVLexer1306667 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)) {
@@ -207,7 +207,7 @@ class CSVLexer1306667 extends Lexer {
tkn.type = EOF;
tkn.isReady = true; // There is data at EOF
return tkn;
- } else if (isEndOfLine(c)) {
+ } else if (readEndOfLine(c)) {
// ok eo token reached
tkn.type = EORECORD;
return tkn;