Skip to content

Commit

Permalink
CSV-279: Optimize Lexer Delimiter Check for One Character Delimiter
Browse files Browse the repository at this point in the history
  • Loading branch information
belugabehr committed Jul 13, 2021
1 parent 3b95962 commit 7d2bb6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/apache/commons/csv/Lexer.java
Expand Up @@ -123,6 +123,9 @@ boolean isDelimiter(final int ch) throws IOException {
if (ch != delimiter[0]) {
return false;
}
if (delimiter.length == 1) {
return true;
}
final int len = delimiter.length - 1;
final char[] buf = reader.lookAhead(len);
for (int i = 0; i < len; i++) {
Expand Down

0 comments on commit 7d2bb6a

Please sign in to comment.