Skip to content

Commit

Permalink
bugfix: trim csv value before format
Browse files Browse the repository at this point in the history
  • Loading branch information
tianlu-root committed Oct 25, 2023
1 parent 158369f commit 35c5d72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/datart/core/common/CSVParse.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public List<List<Object>> parse() throws IOException {
if (!file.exists()) {
Exceptions.notFound(path);
}
List<CSVRecord> records = CSVParser.parse(file, StandardCharsets.UTF_8, CSVFormat.DEFAULT).getRecords();
List<CSVRecord> records = CSVParser.parse(file, StandardCharsets.UTF_8, CSVFormat.DEFAULT.withTrim()).getRecords();
if (CollectionUtils.isEmpty(records)) {
return Collections.emptyList();
}
Expand Down

0 comments on commit 35c5d72

Please sign in to comment.