refactor: replace org.apache.commons.csv.CSVFormat.Builder.build() with org.apache.commons.csv.CSVFormat.Builder.get()
This commit is contained in:
@@ -33,7 +33,7 @@ public class StudentCsvReader implements Iterator<Student> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CSVFormat format = CSVFormat.DEFAULT.builder().setHeader().setSkipHeaderRecord(true).build();
|
CSVFormat format = CSVFormat.DEFAULT.builder().setHeader().setSkipHeaderRecord(true).get();
|
||||||
this.parser = CSVParser.parse(path, StandardCharsets.UTF_8, format);
|
this.parser = CSVParser.parse(path, StandardCharsets.UTF_8, format);
|
||||||
validateHeader(parser.getHeaderMap());
|
validateHeader(parser.getHeaderMap());
|
||||||
this.records = parser.iterator();
|
this.records = parser.iterator();
|
||||||
|
|||||||
Reference in New Issue
Block a user