Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

Conversation

@kaspersorensen
Copy link
Contributor

Today I discovered a small bug in MetaModel's CsvWriter - that it would fail to escape a separator char if there is no quote char. Please find here my patch for the problem.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.contains() (both line 75 and 76)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually .indexOf(...) is better here because it is a char and the search time of indexOf(char) is presumably a lot faster than contains(String) since it only has to evaluate a single character.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that makes sense

@LosD
Copy link
Contributor

LosD commented Dec 17, 2015

Except for the weird stringContainsSpecialCharacters, LGTM.

@asfgit asfgit closed this in f779f43 Jan 2, 2016
@kaspersorensen kaspersorensen deleted the bug/csv-writer-escape-separator-when-not-quoted branch August 5, 2016 05:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants