Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
juerg committed Oct 31, 2023
1 parent a052d74 commit d1c70d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ private String parseQuotedField(final CharacterReader rd) {
}
}
else {
rd.consume();
sb.append((char)ch);
rd.consume();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ private String escape(final String s) {
}

private String quote(final String s) {
return needsQuote(s) ? quote + escape(s) + quote : s;
return needsQuoting(s) ? quote + escape(s) + quote : s;
}

private boolean needsQuote(final String s) {
private boolean needsQuoting(final String s) {
return s != null && (s.contains(" ")
|| s.contains(quote)
|| s.contains(separator)
Expand Down

0 comments on commit d1c70d2

Please sign in to comment.