@@ -33,14 +33,14 @@ public CSVLexer(CSVFormat format, ExtendedBufferedReader in) {
3333 * <p/>
3434 * A token corresponds to a term, a record change or an end-of-file indicator.
3535 *
36- * @param tkn
36+ * @param token
3737 * an existing Token object to reuse. The caller is responsible to initialize the Token.
3838 * @return the next token found
3939 * @throws java.io.IOException
4040 * on stream access error
4141 */
4242 @ Override
43- Token nextToken (Token tkn ) throws IOException {
43+ Token nextToken (Token token ) throws IOException {
4444
4545 // get the last read char (required for empty line detection)
4646 int lastChar = in .readAgain ();
@@ -62,29 +62,29 @@ Token nextToken(Token tkn) throws IOException {
6262 eol = isEndOfLine (c );
6363 // reached end of file without any content (empty line at the end)
6464 if (isEndOfFile (c )) {
65- tkn .type = EOF ;
65+ token .type = EOF ;
6666 // don't set tkn.isReady here because no content
67- return tkn ;
67+ return token ;
6868 }
6969 }
7070 }
7171
7272 // did we reach eof during the last iteration already ? EOF
7373 if (isEndOfFile (lastChar ) || (!isDelimiter (lastChar ) && isEndOfFile (c ))) {
74- tkn .type = EOF ;
74+ token .type = EOF ;
7575 // don't set tkn.isReady here because no content
76- return tkn ;
76+ return token ;
7777 }
7878
7979 if (isStartOfLine (lastChar ) && isCommentStart (c )) {
8080 String comment = in .readLine ().trim ();
81- tkn .content .append (comment );
82- tkn .type = COMMENT ;
83- return tkn ;
81+ token .content .append (comment );
82+ token .type = COMMENT ;
83+ return token ;
8484 }
8585
8686 // important: make sure a new char gets consumed in each iteration
87- while (tkn .type == INVALID ) {
87+ while (token .type == INVALID ) {
8888 // ignore whitespaces at beginning of a token
8989 if (surroundingSpacesIgnored ) {
9090 while (isWhitespace (c ) && !eol ) {
@@ -96,26 +96,26 @@ Token nextToken(Token tkn) throws IOException {
9696 // ok, start of token reached: encapsulated, or token
9797 if (isDelimiter (c )) {
9898 // empty token return TOKEN("")
99- tkn .type = TOKEN ;
99+ token .type = TOKEN ;
100100 } else if (eol ) {
101101 // empty token return EORECORD("")
102102 // noop: tkn.content.append("");
103- tkn .type = EORECORD ;
103+ token .type = EORECORD ;
104104 } else if (isEncapsulator (c )) {
105105 // consume encapsulated token
106- encapsulatedTokenLexer (tkn );
106+ encapsulatedTokenLexer (token );
107107 } else if (isEndOfFile (c )) {
108108 // end of file return EOF()
109109 // noop: tkn.content.append("");
110- tkn .type = EOF ;
111- tkn .isReady = true ; // there is data at EOF
110+ token .type = EOF ;
111+ token .isReady = true ; // there is data at EOF
112112 } else {
113113 // next token must be a simple token
114114 // add removed blanks when not ignoring whitespace chars...
115- simpleTokenLexer (tkn , c );
115+ simpleTokenLexer (token , c );
116116 }
117117 }
118- return tkn ;
118+ return token ;
119119 }
120120
121121 /**
0 commit comments