Menu

#36 CsvBeanReader allows a nameMapping array of the wrong size when processors aren't used

2.0.1
closed
None
7
2012-12-08
2012-11-23
No

When using CsvBeanReader without cell processors, it's possible to specify a name mapping array whose size doesn't match the number of columns in the CSV file. If it's too small then the remaining columns are ignored. If it's too big then it breaks trying to access a column that doesn't exist.

An exception should be thrown if the number of nameMapping elements doesn't match the number of columns read.

It may also apply to CsvDozerBeanReader.

Discussion

  • James Bassett

    James Bassett - 2012-11-24

    Fixed in [r263]. CsvDozerBeanReader was left as is, as it doesn't allow a nameMapping array for each read() - it's configureBeanMapping() is called prior to reading.

     

    Related

    Commit: [r263]

  • James Bassett

    James Bassett - 2012-11-24
    • status: open --> pending
     
  • James Bassett

    James Bassett - 2012-12-08
    • status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB