Skip to content

Commit 17c2635

Browse files
committed
org.apache.commons.csv.Token.reset() does not need to return itself. Save a return.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397906 13f79535-47bb-0310-9956-ffa450edef68
1 parent aa4d069 commit 17c2635

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,10 @@ enum Type {
5555
/** Token ready flag: indicates a valid token with content (ready for the parser). */
5656
boolean isReady;
5757

58-
Token reset() {
58+
void reset() {
5959
content.setLength(0);
6060
type = INVALID;
6161
isReady = false;
62-
return this;
6362
}
6463

6564
// Provide toString method for IDE debugging

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ Token nextToken(Token tkn) throws IOException {
9797
if (c == format.getCommentStart()) {
9898
// ignore everything till end of line and continue (incr linecount)
9999
in.readLine();
100-
tkn = nextToken(tkn.reset());
100+
tkn.reset();
101+
tkn = nextToken(tkn);
101102
} else if (c == format.getDelimiter()) {
102103
// empty token return TOKEN("")
103104
tkn.type = TOKEN;

0 commit comments

Comments
 (0)