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 19:24:27 UTC

svn commit: r1397906 - in /commons/proper/csv/trunk/src: main/java/org/apache/commons/csv/Token.java test/java/org/apache/commons/csv/CSVLexer1.java

Author: ggregory
Date: Sat Oct 13 17:24:27 2012
New Revision: 1397906

URL: http://svn.apache.org/viewvc?rev=1397906&view=rev
Log:
org.apache.commons.csv.Token.reset() does not need to return itself. Save a return.

Modified:
    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Token.java
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1.java

Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Token.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Token.java?rev=1397906&r1=1397905&r2=1397906&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Token.java (original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Token.java Sat Oct 13 17:24:27 2012
@@ -55,11 +55,10 @@ class Token {
     /** Token ready flag: indicates a valid token with content (ready for the parser). */
     boolean isReady;
 
-    Token reset() {
+    void reset() {
         content.setLength(0);
         type = INVALID;
         isReady = false;
-        return this;
     }
 
     // Provide toString method for IDE debugging

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=1397906&r1=1397905&r2=1397906&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 17:24:27 2012
@@ -97,7 +97,8 @@ class CSVLexer1 extends Lexer {
             if (c == format.getCommentStart()) {
                 // ignore everything till end of line and continue (incr linecount)
                 in.readLine();
-                tkn = nextToken(tkn.reset());
+                tkn.reset();
+                tkn = nextToken(tkn);
             } else if (c == format.getDelimiter()) {
                 // empty token return TOKEN("")
                 tkn.type = TOKEN;