File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323
2424class CSVLexer extends Lexer {
2525
26- private final StringBuilder wsBuf = new StringBuilder ();
27-
2826 // ctor needs to be public so can be called dynamically by PerformanceTest class
2927 public CSVLexer (CSVFormat format , ExtendedBufferedReader in ) {
3028 super (format , in );
@@ -41,7 +39,6 @@ public CSVLexer(CSVFormat format, ExtendedBufferedReader in) {
4139 */
4240 @ Override
4341 Token nextToken (Token tkn ) throws IOException {
44- wsBuf .setLength (0 ); // reuse
4542
4643 // get the last read char (required for empty line detection)
4744 int lastChar = in .readAgain ();
@@ -84,7 +81,6 @@ Token nextToken(Token tkn) throws IOException {
8481 // ignore whitespaces at beginning of a token
8582 if (leadingSpacesIgnored ) {
8683 while (isWhitespace (c ) && !eol ) {
87- wsBuf .append ((char ) c );
8884 c = in .read ();
8985 eol = isEndOfLine (c );
9086 }
@@ -115,9 +111,6 @@ Token nextToken(Token tkn) throws IOException {
115111 } else {
116112 // next token must be a simple token
117113 // add removed blanks when not ignoring whitespace chars...
118- if (!leadingSpacesIgnored ) {
119- tkn .content .append (wsBuf );
120- }
121114 simpleTokenLexer (tkn , c );
122115 }
123116 }
You can’t perform that action at this time.
0 commit comments