aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api-impl
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-plugin-api-impl')
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/MultivalueProperty.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/MultivalueProperty.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/MultivalueProperty.java
index 338aca11c34..255f97067fd 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/MultivalueProperty.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/MultivalueProperty.java
@@ -45,10 +45,11 @@ public class MultivalueProperty {
public static String[] parseAsCsv(String key, String value, UnaryOperator<String> valueProcessor) {
String cleanValue = MultivalueProperty.trimFieldsAndRemoveEmptyFields(value);
List<String> result = new ArrayList<>();
- try (CSVParser csvParser = CSVFormat.RFC4180
- .withHeader((String) null)
- .withIgnoreEmptyLines()
- .withIgnoreSurroundingSpaces()
+ try (CSVParser csvParser = CSVFormat.RFC4180.builder()
+ .setSkipHeaderRecord(true)
+ .setIgnoreEmptyLines(true)
+ .setIgnoreSurroundingSpaces(true)
+ .build()
.parse(new StringReader(cleanValue))) {
List<CSVRecord> records = csvParser.getRecords();
if (records.isEmpty()) {