From 35c5d727ce61aac050489bd58d7e59edebbc17e3 Mon Sep 17 00:00:00 2001 From: tianlu <761302945@qq.com> Date: Wed, 25 Oct 2023 18:11:07 +0800 Subject: [PATCH] bugfix: trim csv value before format --- core/src/main/java/datart/core/common/CSVParse.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/datart/core/common/CSVParse.java b/core/src/main/java/datart/core/common/CSVParse.java index 70f52d03d..95783c1eb 100644 --- a/core/src/main/java/datart/core/common/CSVParse.java +++ b/core/src/main/java/datart/core/common/CSVParse.java @@ -61,7 +61,7 @@ public List> parse() throws IOException { if (!file.exists()) { Exceptions.notFound(path); } - List records = CSVParser.parse(file, StandardCharsets.UTF_8, CSVFormat.DEFAULT).getRecords(); + List records = CSVParser.parse(file, StandardCharsets.UTF_8, CSVFormat.DEFAULT.withTrim()).getRecords(); if (CollectionUtils.isEmpty(records)) { return Collections.emptyList(); }