This repository was archived by the owner on Jan 22, 2019. It is now read-only.

Description
Duplicate column value when parsing objects from the input stream with a schema causes dropped data.
It appears that the mapper uses the value for the column name and therefor, when there are duplicate data elements, only one is returned.
Example contained in code below.
public static void main(String[] args) throws JsonProcessingException,
IOException {
String dataString="\"foo\",\"bar\",\"foo\"";
ByteArrayInputStream bais = new ByteArrayInputStream(dataString.getBytes());
CsvSchema schema = CsvSchema.builder().addColumn("Col1").addColumn("Col2")
.addColumn("Col3").build();
MappingIterator<Object> iter = new CsvMapper().reader(Object.class)
.with(schema).readValues(bais);
Object o = iter.next();
Map<?, ?> colData = (Map<?, ?>) o;
System.out.println("I think this should be: "+schema );
System.out.println(colData.keySet());
System.out.println("I think this should be: "+dataString );
System.out.println(colData.values());
}