RED-10260: add quoteChar to component mapping
This commit is contained in:
parent
69f7d688d0
commit
01005cc436
@ -16,7 +16,7 @@ val layoutParserVersion = "0.181.0"
|
|||||||
val jacksonVersion = "2.15.2"
|
val jacksonVersion = "2.15.2"
|
||||||
val droolsVersion = "9.44.0.Final"
|
val droolsVersion = "9.44.0.Final"
|
||||||
val pdfBoxVersion = "3.0.0"
|
val pdfBoxVersion = "3.0.0"
|
||||||
val persistenceServiceVersion = "2.587.0"
|
val persistenceServiceVersion = "2.592.0-RED10260.0"
|
||||||
val llmServiceVersion = "1.11.0"
|
val llmServiceVersion = "1.11.0"
|
||||||
val springBootStarterVersion = "3.1.5"
|
val springBootStarterVersion = "3.1.5"
|
||||||
val springCloudVersion = "4.0.4"
|
val springCloudVersion = "4.0.4"
|
||||||
|
|||||||
@ -76,7 +76,7 @@ public class ComponentMappingMemoryCache {
|
|||||||
|
|
||||||
Charset charSet = Charset.forName(metadata.getEncoding());
|
Charset charSet = Charset.forName(metadata.getEncoding());
|
||||||
List<String[]> data;
|
List<String[]> data;
|
||||||
try (Reader fileReader = new FileReader(mappingFile, charSet); CSVReader reader = buildReader(fileReader, metadata.getDelimiter())) {
|
try (Reader fileReader = new FileReader(mappingFile, charSet); CSVReader reader = buildReader(fileReader, metadata.getDelimiter(), metadata.getQuoteChar())) {
|
||||||
List<String[]> rawData = reader.readAll();
|
List<String[]> rawData = reader.readAll();
|
||||||
rawData.remove(0); // remove header row
|
rawData.remove(0); // remove header row
|
||||||
data = rawData;
|
data = rawData;
|
||||||
@ -86,9 +86,9 @@ public class ComponentMappingMemoryCache {
|
|||||||
|
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
private static CSVReader buildReader(Reader reader, char delimiter) {
|
private static CSVReader buildReader(Reader reader, char delimiter, char quoteChar) {
|
||||||
|
|
||||||
return new CSVReaderBuilder(reader).withCSVParser(new CSVParserBuilder().withSeparator(delimiter).build()).build();
|
return new CSVReaderBuilder(reader).withCSVParser(new CSVParserBuilder().withSeparator(delimiter).withQuoteChar(quoteChar).build()).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user