Closed
Description
When reading given CSV with jackson-dataformat-csv 2.11.4
name
Roger
Chris
using following snippet
CsvMapper csvMapper = new CsvMapper();
csvMapper.configure(CsvParser.Feature.FAIL_ON_MISSING_COLUMNS, true);
CsvSchema csvSchema = CsvSchema.builder().setUseHeader(true).setReorderColumns(true)
.addColumn("name").addColumn("age").build();
List<Person> persons = csvMapper
.readerFor(Person.class)
.with(csvSchema)
.<Person> readValues(csv)
.readAll();
...
class Person {
public String name;
public int age;
}
doesn't throw a CsvMappingException
although age
column is missing in CSV.